This is what I have

This is what I want

Basically the orange element is a “container” div which have overflow: hidden; and I want it’s child divs to “fit in it” even if it’s overflowing to the right. The first picture represent wath I get and the second one what I expect the code from doing.
To get over this problem I have added another div with width: 1000000px; but I don’t think that it’s a clean solution. Is there any other ways to solve this problem?
(I’m using the latest Google Chrome)
On your container element, specify white-space:nowrap and don’t float the items inside, rather set display: inline-block on them.
Here’s an example:
UPDATE
Did a bit of reading, and strangely enough, the spaces between successive inline-block elements are removed if you change your html to look like this:
Check out the answer to this question: Unwanted margin in inline-block list items.