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

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

문제

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).

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top