How would I scroll a stack of images, horizontally, through a vertically aligned space? Imagine a layout like this:
I have a viewable area, say a div, with a fixed size (50px wide by 300px tall) and overflow set to none to hide anything outside of it…
That div has three images stacked vertically displayed inside it…
On click of a button I want to move those three images off to the left while moving in another set of three images from the right.
How do you do this? Should I create an unordered list for each set of three images and then move those UL’s using javascript? This seems to make layout difficult. How would you approach this?
lastandfirstselectors: li:first. Shift them using the width of the list item.Here is a shifting function: