OK, so I have these background <div>s which pan left and right using the jQuery plugin, spritely.
So, I was wondering what the best way to position them was.
I obviously have specified both of the two <div>s which each contains one background image to have a z-index: -1 so they appear behind everything else.
But I would like them to be one after another, row by row essentially in the background.
I just need to find out how to do that using CSS, so any ideas you guys have please let me know!
Thanks!
UPDATE:
Trying a jsFiddle here:
http://jsfiddle.net/uNmuf/
The only problem appears to still be the positioning…
For some reason I can’t get it to work right yet..
UPDATE UPDATE:
Hey thanks a lot Pat, it actually works great! Check out the jsFiddle and my page too!
I would position them absolutely with the first row starting at
top: 0and the second row attop: height_of_first_div. Ideallyheight_of_first_divwill be constant so you can hardcode it in the CSS, but if not, you could always use a snippet of jQuery to put it in the right spot onload.The CSS would look something like this, assuming the
<div>‘s are fixed height:And the associated HTML:
You can see it in action here.