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

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

Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top