Left-right two-column Web Standard (DIV+CSS) layout code

Source: Internet
Author: User
menu layer Fixed width, content layer adaptive.

Here's the code:
<title>nice and free CSS Template 2</title>
<style type= "text/css" media= "screen" ><!--
/* Body und schrift Deffinitionen * *
HTML {
padding:0px;
margin:0px;
}
Body {
Background-color: #e1ddd9;
font-size:12px;
Font-family:verdana, Arial, Sunsans-regular, Sans-serif;
Color: #564b47;
padding:0px 20px;
margin:0px;
}
P, Pre, H2 {
padding:10px;
margin:0px
}
H1 {
font-size:11px;
Text-transform:uppercase;
Text-align:right;
Color: #564b47;
Background-color: #90897a;
padding:5px 15px;
margin:0px
}
H2 {
font-size:14px;
padding-top:10px;
Text-transform:uppercase;
Color: #564b47;
Background-color:transparent;
}
A
Color: #ff66cc;
font-size:11px;
Background-color:transparent;
Text-decoration:none;
}
Pre {
Color: #564b47;
font-size:11px;
Background-color:transparent;
Font-family:courier, Monaco, monospace;
}
/* Positioning-layers Statisch und Absolut * *
#menu {
Position:absolute;
width:200px;
left:20px;
Background-color: #ff99CC;
padding:0px;
margin:0px
}
#content {
margin-left:200px;
Background-color: #fff;
Overflow:auto;
}
--></style>
<body>
<div id= "Menu" >
<pre>
#menu {
Position:absolute;
width:200px;
left:20px;
padding:0px;
margin:0px
}
</pre>
<p>
<br/>
<br
</p>
</div>
<div id= "Content" >
<p>all templates are XHTML 1.0 and css2/tableless.</p>
<p><b>2 columns/menu fixed, content dynamic.</b><br/>
2 columns layout grid. The navigation column is fixed, the content column are dynamic and adjusts itself to the browser
Window.<br/>
The layout also works with a absolute height <a href= "temp02_100height.html" >template 100% height</a><br/ >
<a href= "/" >more nice and free css templates</a><br/>
</p>
<pre>
HTML {
padding:0px;
margin:0px;
}
Body {
Background-color: #e1ddd9;
font-size:12px;
Font-family:verdana, Arial, Sunsans-regular, Sans-serif;
Color: #564b47;
padding:0px 20px;
margin:0px;
}
#content {
margin-left:200px;
Background-color: #fff;
Overflow:auto;
}
</pre>
</div>
</body>

The following is an HTML script effect code, click the Run button to view the effect:
[Ctrl + a ALL SELECT hint: You can modify some of the code, and then press to run]

Related Article

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.