Lots of Float:left Elements. Force them to go beyond container's width instead of jumping below?
-
11-06-2021 - |
Вопрос
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.
Не связан с StackOverflow