I have the following code:
HTML
<div id="parent">
<div class="child">2001</div>
<div class="child">2O02</div>
<div class="child">2003</div>
<div class="child">2004</div>
<div class="child">2005</div>
</div>
CSS
#parent{
width:100%;
overflow:auto;
}
.Child{
float:left;
width:20px;
}
The child content is always overflowing, and this is good. But I want to be able to scroll horizontally in the parent div, to see the last child divs.
Here is a screenshot of the result as I have it:
How can I do that to make is scroll horizontally?
If you want all childs in a single row, you have to add second "parent" DIV and set it's width (combined widths of all children for a single row):
HTML:
CSS: