日期:2014-05-17  浏览次数:20763 次

CSS布局问题 100分下一页 有什么办法不用写入重复的内容如导航页脚版权信息等
刚开始学习css+xml 问一下有关布局问题
CSS code
body {
font-family: Arial, Helvetica, Verdana, Sans-serif;
font-size: 15px;
color:#666666;
background:#FFDDAA;
margin:0px;
padding:0px;
}


.hidden {
display: none;
}


#container {
width:760px;
background:#FFDDAA;
margin:auto;
}


#main  {
background:#FFCCCC;
height:30px ;
padding:15px 5px 0 0;
}

#main ul {
list-style-type:none;
margin:0;}

#main ul li {
float:right;
margin:0 6px;
}

.sd {width:1.5px;height:17px;background:#FF00FF ;}
#main ul li a:link {background:#FFB3FF;font-weight:bold; color:#CC6666}
#main ul li a:visited {font-weight:bold;background:#B94FFF;}
#main ul li a:hover {font-weight:bold;background:#BBFF00;}


#header {
background:#FFA488;
height:150px;
}


#content {
float:left;
width:550px;
background:#FFBB00;
line-height:25px;
}

#content  h2{
margin: 0;
padding: 0;
padding-bottom:10px;
}

#content  p {
margin: 0;
padding: 0;
padding-bottom:15px;
}

#content  .padding {
padding: 20px;
}

.aa { 
font-family:华文行楷;
font-size:20px;
color:#770077;
font-weight:bold;
text-decoration:none;
}


#side {
float:right;
width:205px;
background:#FF7744;
line-height:25px;
}

#side h2{
color:#3399CC;
margin: 0;
text-align:center;
}

hr {margin:0;
padding:0;}

#side ul li a{
margin: 0;
padding: 0;
padding-bottom:9px;
}

#side  .padding {
padding: 20px;
}


#footer {
clear:both;
background:#D28EFF;
font-family:??_GB2312;
font-size:14px;
color:#660077 ;
height:66px;
border-top: 1px solid #FF8888;
padding: 13px 25px;
line-height: 20px;
text-align:center;
}

#footer a {
color: #5555FF;
text-decoration:inherit;
}

#footer a:hover {
color: #770077;
}



h1 {
margin: 0;
padding: 0;
}






HTML code
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="aduhom" content=adu_hom@126.com>
<title>css布局示例 </title>
<link href="css/css.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="container">
<div id="main">
<ul>
<li> <a href="http://blog.sina.com.cn/lovergoodbye" >关于我 </a> </li>
<li class="sd"> </li>
<li> <a href="http://blog.sina.com.cn/adudesigner" >留言本 </a> </li>
<li class="sd"> </li>
<li> <a href="http://blog.sina.com.cn/adudesigner" >CSS布局 </a> </li>
<li class="sd"> </li>
<li> <a href="http://blog.sina.com.cn/adudesigner" >WEB标准 </a> </li>
<li class="sd"> </li>
<li> <a href="http://blog.sina.com.cn/adudesigner" >我的博客 </a> </li>
<li class="sd"> </li>
<li> <a href="http://blog.sina.com.cn/adudesigner" >我的主页 </a> </li>
</ul>
</div>
<div id="header"> <img src="imag/about.jpg" alt="我的个人主页" width="760" height="150"/> </div>
<div id="content">
<div class="padding">
<h2>
<img src="imag/logo_enlighten.gif"  alt="人生格言" width="236" height="36"/> </h2>
<p> <strong>"永远做你害怕的事,你应该每一两天做一些你不想做的事." </stron