Please see the demo here: http://jsfiddle.net/Freewind/Vkp4U/
The html:
<div class="outer">
<div class="x">x</div>
<div class="y">y</div>
<div class="z">z</div>
</div>
The css:
.outer {
border: 1px solid black;
overflow: scroll-x;
}
.x {
width: 400px;
border: 1px solid red;
float:left;
}
.y {
width: 400px;
border: 1px solid yellow;
float:left;
}
.z {
width: 400px;
border: 1px solid blue;
float:left;
}
How to let the 3 inner divs displayed in line, won’t wrap if I resize the browser to smaller?
Limitations:
- the width of outer div should not be specified
- the width of inner divs are fixed
Hi you can define display table and table-cell in you css properties as like this
Css
HTML
Live demo http://jsfiddle.net/Vkp4U/5/