<div class="container_row">
<div class="layer1">
I am the layer behind
</div>
<div class="layer2">
I am actually on top
</div>
</div>
<div class="container_row">
Yuppi! This line is positioned successfully! This would not have been the case with position:absolute
</div>
<div class="container">
<div>Div 1</div>
<div>Div 2 on top of div 1</div>
<div>Div 3 on top of div 1 and 2</div>
</div>
<style type="text/css">
.container {
/* to align absolute children to relative parent */
position: relative;
}
.container > div {
/* no need for z-index, the lower div will be higher
use z-index if you want a specific div to be on top of others */
position: absolute;
}
</style>
David Antoon