Cannot get images to overlap

13 Views Asked by At

I'm building a photo gallery using Stellar.js, and it gets tricky to make images overlap (just a simple parallax effect, that said).

Here's the link: http://foalenraged.com/david/indexi.php

Here's the way I would like it to work: http://markpeckmezian.com/

Divs are generated using PHP:

 for($i = 0; $i <= 15; $i++){
                $rand = rand(1, 20);
                $rand = $rand/10;
                $margin = -1*(1500-($i*100));
                echo '<div id="image'.$i.'" data-stellar-ratio="'.$rand.'" data-stellar-vertical-offset="'.$margin.'" style="z-index: '.$i.'; width="10%"><img src="'.$dir."/".$files[$i].'"></div>
                ';


            }
0

There are 0 best solutions below