This is an unpositioned or just normal flow div container. Its green child might be way down to the right quite outside this yellow box or walking annoyingly all over it depending on how wide and high you have your browser. If you don't want this, then 'position' the parent
CSS | HTML |
---|---|
.one { color: #000; background: #cfc; width: 800px; height: 10em; padding: .5em; } .two { position: absolute; left: 50%; bottom: 0; color: #000; background: #fcc; padding: .5em; } |
<div class="one">This is an unpositioned or just normal flow yellow div container ... <div class="two"> This is an absolutely positioned green descendant of the yellow div container... </div> </div> |