HTML 元素位置的设置

来源:互联网 发布:iis7怎么执行php 编辑:程序博客网 时间:2024/04/17 05:22

<div  id="footer">
<ul>
      <li   class="footer_img"></li>
 <li   class="footer_author">版权所有 2015</li>
</ul>

</div>


#footer {


width:700px ;
margin:0  auto;


}



#footer  ul{
margin:0;
width:701px ;
padding:0;


}


#footer .footer_img{  
;
background:url(images/images/tab02.gif) repeat-x;
height:20px;/*一定要定义高度,不然list-style:none;之后,图片就不见了*/
list-style:none;


#footer  .footer_author{


list-style:none;
 line-height:25px;
  padding-bottom:5px;
  text-align:center;
  
  }


}




遇到的问题:#footer  ul 是向右偏的,不是的居中的

解决办法: 设置pading=0 ;


其实最主要问题是: 我知道他是偏的,我没有找对偏的那一块区域对应的是#footer  ul  


页面中有问题的地方一定要在  相应的   样式代码中修改





0 0