Hey all,
I'm just curious. Overflow auto typically works with p, h1, and other block level elements that occupy space in the normal flow. However, when I try to have it overflow divs (which I know are empty block level elements), I still specify a styling to those divs, speciically a width and height (so now they occupy space), yet the overflow: auto for the container div still doesn't overflow:
Code:
<div id="container">
<div id="s01"></div>
<div id="s02"></div>
<div id="s03"></div>
<div id="s04"></div>
<div id="s05"></div>
<div id="s06"></div>
<div id="s07"></div>
<div id="s08"></div>
</div>
#container {
position: relative;
left: 100px;
width: 580px;
border: 1px solid #f00;
overflow: auto;
}
#s01 {
position:absolute;
left:19px;
top:23px;
width:50px;
height:50px;
border: 2px solid #000;
}
#s02 {
position:absolute;
left:138px;
top:23px;
width:50px;
height:50px;
border: 2px solid #000;
}
#s03 {
position:absolute;
left:256px;
top:23px;
width:50px;
height:50px;
border: 2px solid #000;
}
#s04 {
position:absolute;
left:375px;
top:23px;
width:50px;
height:50px;
border: 2px solid #000;
}
#s05 {
position:absolute;
left:493px;
top:23px;
width:50px;
height:50px;
border: 2px solid #000;
}
#s06 {
position:absolute;
left:19px;
top:114px;
width:50px;
height:50px;
border: 2px solid #000;
}
#s07 {
position:absolute;
left:138px;
top:117px;
width:50px;
height:50px;
border: 2px solid #000;
}
#s08 {
position:absolute;
left:256px;
top:117px;
width:50px;
height:50px;
border: 2px solid #000;
}
I am missing a rule here? Thanks for any response. Also, do you think it is better to dynamically build those divs in javascript on page load?