Add all three divs to the div container, then make the window wrap around a long div and hide the overflow.
Example, if the window area is 960px, then inside the div will be 3x 960 (2880)
You can center it by changing its left position in increments of 960 (placing a long div in relative positioning and overflowing the window to hidden)
#window{ width:960px; overflow: hidden; } #container{ position: relative; left: -960px; } .content_box{ width:960px; }
Then you can use javascript (jQuery) to animate the left position:
$('#arrow-left').click(function() { $('#container').animate({ left: '-=960' }, 5000, function() {
More information about .animate can be found in the manual: http://api.jquery.com/animate/
source share