CSS + Div (box)

Source: Internet
Author: User

The following is a reference clip:
<Style type = "text/CSS">
<! --
*{
Margin: 0px;
Padding: 0px;
}
Body {
Font-family: Arial, Helvetica, sans-serif;
Font-size: 12px;
Margin: 0px auto;
Height: auto;
Width: 760px;
Border: 1px solid #006633;
}
# Header {
Height: 100px;
Width: 760px;
Background-image: url(headpic.gif );
Background-repeat: No-Repeat;
Margin: 0px 0px 3px 0px;
}
# Nav {
Height: 25px;
Width: 760px;
Font-size: 14px;
List-style-type: none;
}
# Nav Li {
Float: left;
}
# Nav Li {
Color: #000000;
Text-Decoration: none;
Padding-top: 4px;
Display: block;
Width: 97px;
Height: 22px;
Text-align: center;
Background-color: #009966;
Margin-left: 2px;
}
# Nav Li A: hover {
Background-color: #006633;
Color: # ffffff;
}
# Content {
Height: auto;
Width: 740px;
Line-Height: 1.5em;
Padding: 10px;
}
# Content P {
Text-indent: 2em;
}
# Content H5 {
Font-size: 16px;
Margin: 10px;
}
# Footer {
Height: 50px;
Width: 740px;
Line-Height: 2em;
Text-align: center;
Background-color: #009966;
Padding: 10px;
}
-->
</Style>

The Structure Code is as follows:

The following is a reference clip:
<Body>
<Div id = "Header"> </div>
<Ul id = "nav">
<Li> <a href = "#"> first page </a> </LI>
<Li> <a href = "#"> chapter </a> </LI>
<Li> <a href = "#"> album </a> </LI>
<Li> <a href = "#"> blog </a> </LI>
<Li> <a href = "#"> discussion </a> </LI>
<Li> <a href = "#"> help </a> </LI>
</Ul>
<Div id = "content">
<H5> preface </H5>
<P> content of the first paragraph </P>
<H5> understand the CSS box mode </H5> CSS
<P> section 2 </P>
</Div>
<Div id = "footer">
<P> about Hua Sheng | advertisement service | Hua Sheng recruitment | Customer Service Center | Q message | website management | member logon | shopping cart </P> <p> copyright? 2006-2008 Tang Guohui. All Rights Reserved </P>
</Div>
</Body>

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.