Container with Height:100%

Return to article

Setting a container's height to 100% will stretch the container to the full height of its parent if it is absolutely positioned and it's parent's height is set.

<style type="text/css"> body { margin:0; padding:0; position:absolute; height:100%; background-color:orange; width:100%; } div.full { position:absolute; top:0; left:25%; width:50%; height:100%; background-color:white; padding:0 1em; } </style>

View the source of this page for more info.