<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE HTML PUBLIC "-//w3c//dtd XHTML 1.1//en"
"Http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
<title>one hundred Percent Height divs</title>
<style type= "text/css" media= "screen" >
Body {
margin:0;
padding:0;
height:100%; /* This is the key! */
}
#left {
Position:absolute;
left:0;
top:0;
padding:0;
width:200px;
height:100%; /* works only if the parent container is assigned a height value */
Color: #333;
Background: #eaeaea;
border:1px solid #333;
}
. Content {
margin-left:220px;
margin-right:220px;
margin-bottom:20px;
Color: #333;
Background: #ffc;
border:1px solid #333;
padding:0 10px;
}
#right {
Position:absolute;
right:0;
top:0;
padding:0;
width:200px;
height:100%; /* works only if the parent container is assigned a height value */
Color: #333;
Background: #eaeaea;
border:1px solid #333;
}
#left p {
padding:0 10px;
}
#right p {
padding:0 10px;
}
P.top {
margin-top:20px;
}
</style>
<body>
<div id= "Left" >
<p class= "Top" >this design uses a defined body height of 100% which allows setting the
contained left and right divs at 100% height.</p>
<p>this design uses a defined body height of 100% which allows setting the contained left and
Right divs at 100% height.</p>
<p>this design uses a defined body height of 100% which allows setting the contained left and
Right divs at 100% height.</p>
</div>
<div class= "Content" >
<p>this design uses a defined body height which of 100% allows setting the contained left and
Right divs at 100% height.</p>
</div>
<div class= "Content" >
<p>this design uses a defined body height which of 100% allows setting the contained left and
Right divs at 100% height.</p>
</div>
<div class= "Content" >
<p>this design uses a defined body height which of 100% allows setting the contained left and
Right divs at 100% height.</p>
</div>
<div id= "Right" >
<p class= "Top" >to solve an inheritance issue displayed in Div #right as rendered in Opera, class P.top
Using Margin-top:20; is applied to the first paragraph of each outer divs.</p>
<p>this design uses a defined body height which of 100% allows setting the contained left and
Right divs at 100% height.</p>
<p>this design uses a defined body height which of 100% allows setting the contained left and
Right divs at 100% height.</p>
</div>
</body>
Http://www.webmasterworld.com/forum83/200.htm
From:
A div three-column layout 100% highly adaptive good examples (abroad)