How to make the DIV expand than the browser window, to place it horizontally, rather than force them in new lines.
i.e. consider the following code with a violin. There are 6 child elements inside the container element, all with a minimum width of 200 pixels and all set to float: left. When the window size changes quite wide, they are all on the same line. When it narrows, they begin to push toward new rows. Ideally, I would like them to stay on the same line and display a scroll bar on the browser panel.
http://jsfiddle.net/krippy2k/x8sDp/20/
.container { } .child-element { min-width: 200px; float: left; height: 100px; } .child1 { background-color: purple; } .child2 { background-color: orange; } .child3 { background-color: black; } .child4 { background-color: green; } .child5 { background-color: blue; } .child6 { background-color: red; } <div class="container"> <div class="child-element child1"></div> <div class="child-element child2"></div> <div class="child-element child3"></div> <div class="child-element child4"></div> <div class="child-element child5"></div> <div class="child-element child6"></div> </div>
source share