Two-column standard DIV+CSS layout example with scroll bars

Source: Internet
Author: User
Tags window
css| Standard | example | scroll bar

Scroll bars automatically appear when the window shrinks beyond the width of the layer ...

Here's the code:
<title>nice and free CSS Template 2a</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;
}
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;
Color: #564b47;
Background-color:transparent;
}
P,H2, Pre {
padding:10px;
}
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 Dynamisch * *
#menu {
Float:left;
width:25%;
Background-color: #ff99CC;
Overflow:auto;
}
#content {
Float:left;
width:75%;
margin:0px 0px 50px 0px;
Background-color: #fff;
Overflow:auto;
}
--></style>
<body>
<div id= "Menu" ><pre>
#menu {
Float:left;
width:25%;
Background-color: #ff99CC;
Overflow:auto;
}
</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 and Content dynamic</b><br/>
2 Column Layout grid. The navigation column and content column are dynamic and adjust themselves to the browser window.<br
This layout also works with a absolute height <a href= "temp02a_100height.html" >template 100% R/>
<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 {
Float:left;
width:75%;
Background-color: #fff;
margin:0px 0px 50px 0px;
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.