Archive for category css
CSS 100% Height Div
the body CSS:
body {
margin:0;
padding:0;
height:100%; /* this is the key! */
}
100% Height Div CSS
#fullHeight{
position:absolute;/* this is the key too! */
left:0;
top:0;
padding:0;
width:200px;
height:100%; /* works only if parent container is assigned a height value */
color:#333;
background:#eaeaea;
border:1px solid #333;
}
Html Example:
<body> <div id="fullHeight"> This design uses a defined body height of 100% which allows setting the contained left and right divs at 100% height.</p> </div> </body>
note: the 100% height div only works if parent container is assigned a height value (ex. 100%)