A div three-column layout 100% highly adaptive good examples (abroad)

Source: Internet
Author: User

<?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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.