Home  >  Article  >  Web Front-end  >  CSS DIV(box)_html/css_WEB-ITnose

CSS DIV(box)_html/css_WEB-ITnose

PHP中文网
PHP中文网Original
2016-06-24 12:33:27899browse

CSS DIV(box)_html/css_WEB-ITnose

The following is a quoted fragment:

<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 a{ 
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 like this:

The following is a quotation fragment:

<body> 
<p id="header"></p> 
<ul id="nav"> 
<li><a href="#">首 页</a></li> 
<li><a href="#">文 章</a></li> 
<li><a href="#">相册</a></li> 
<li><a href="#">Blog</a></li> 
<li><a href="#">论 坛</a></li> 
<li><a href="#">帮助</a></li> 
</ul> 
<p id="content"> 
<h5>前言</h5> 
<p>第一段内容</p> 
<h5>理解CSS盒子模式</h5> css
<p>第二段内容</p> 
</p> 
<p id="footer"> 
<p>关于华升 | 广告服务 | 华升招聘 | 客服中心 | Q Q留言 | 网站管理 | 会员登录 | 购物车</p>
<p>Copyright ?2006 - 2008 Tang Guohui. All Rights Reserved</p> 
</p> 
</body>


The above is the content of CSS DIV (box)_html/css_WEB-ITnose , for more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn