I just wonder why the div with the CLASS = "optionsArea-1" is in the top, when I thought it should be below the div with the ID = "configContainer"? I know in part why and it's because of the position relative/absolute, but why does it act like that and why do I not get the common flow of divs?
Snippet:
#mainContainer {
margin: 0 auto;
width: 1000px;
height: auto;
}
#innerContainer {
width: 100%;
height: 100%;
}
#configContainer {
position: relative;
width: 100%;
height: auto;
}
.optionsArea-1 {
height: 100px;
}
.optionsArea-2 {
height: 100px;
}
.layer-1 {
z-index: 20;
position: absolute;
top: 0;
left: 0;
}
.layer-2 {
z-index: 10;
position: absolute;
top: 0;
left: 0;
}
<body>
<div id="mainContainer">
<div id="innerContainer">
<div id="configContainer">
<div class="layer-1">
<img src="http://via.placeholder.com/100x000" alt="">
</div>
<div class="layer-2">
<img src="http://via.placeholder.com/100x100" alt="">
</div>
</div>
<div class="optionsArea-1">
<div class="optionsMenu-1">
<ul>
<li><a href="#">Option 1</a></li>
<li><a href="#">Option 2</a></li>
<li><a href="#">Option 3</a></li>
</ul>
</div>
</div>
</div>
</div>
</body>