How to arrange many <div> elements side by side with no wrap

Reza Owliaei picture Reza Owliaei · Apr 22, 2012 · Viewed 50.2k times · Source

There are three div elements side by side in a container div, with smaller width than children total width. Here you can find the Fiddle of the case:

I want to make container div scroll horizontally in order to show other children.

How can I arrange children not to wrap inside container div? It scroll vertically now, I want it to scroll horizontally.

Answer

Niet the Dark Absol picture Niet the Dark Absol · Apr 22, 2012

Change float: left to display: inline-block; and add white-space: nowrap to the container.