Lots of Float:left Elements. Force them to go beyond container's width instead of jumping below?

StackOverflow https://stackoverflow.com/questions/10812403

Question

I have a fixed width container and a lot of divs inside with float:left applied to them.

However, when I add some more divs inside they go below the first ones, like on a new line.

I need them to go beyond the container's width (it has overflow:hidden applied).

Était-ce utile?

La solution

Hope this is what you were looking for: http://jsfiddle.net/PsTRq/

The trick is to create 2 level wrappers. One is the outer with fixed width. The second inside is the real wrapper for items with 'unlimited' width.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top