首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

增加了框子,内容就下移

2012-07-26 
增加了边框,内容就下移原本没边框的时,里面的内容刚好撑满div,但是加了边框后,里面的内容就偏移了foot高度

增加了边框,内容就下移
原本没边框的时,里面的内容刚好撑满div,
但是加了边框后,里面的内容就偏移了foot高度的一半!
  我测试了下,是(margin-top:15px;
border-bottom:1px;)这里出问题,请问该如何修改!
#foot{
width:100%;
height:43px;
margin-top:15px;
border-bottom:1px;
border-bottom-style:solid;
border-top:1px;
border-top-style:solid;
background-color:#996699;
}
.zi{
text-align:center;
color:#646464;
}

<div id="foot">
<p class="zi">Copyright @2006 Your Company | All rights reserved<br>
Design by <a href="ss.html">Gerhard Studios</a> | <a href="ss.html">W3C XHTML 1.1</a> | <a href="ss.html">W3C CSS 2.0</a>
</p>
</div>

[解决办法]

HTML code
<div id="foot">        <div class="zi">            Copyright @2006 Your Company | All rights reserved<br>            Design by <a href="ss.html">Gerhard Studios</a> | <a href="ss.html">W3C XHTML 1.1</a>            | <a href="ss.html">W3C CSS 2.0</a>        </div>    </div> 

热点排行