I have a container DIV with a fixed height and width (275x1000px). In this DIV I want to put multiple floating DIVs each with a width of 300px, and have a horizontal (x-axi
Put the divs you want to scroll in a table like so:
Cell 1
Cell 2
Cell 3
Cell 4
Cell 5
Edit: I tried 3 of these suggested solutions - they all work fine in Google Chrome - but the first one (container1) doesn't work in IE (go figure) - so the SPAN solution gets my vote :-) :
Cell 1
Cell 2
Cell 3
Cell 4
Cell 5
Cell 1
Cell 2
Cell 3
Cell 4
Cell 5
Cell 1
Cell 2
Cell 3
Cell 4
Cell 5
Edit 2:
I ran this test page through browsershots.org, to see how different browsers handle it. Conclusion: Browser compatibility sucks. :-)
http://browsershots.org/http://dot-dash-dot.com/files/test_div2.htm
The table solution worked more often - but the span option (which is cleaner) only broke on browsers I've never heard of. :-)