Home  >  Article  >  Web Front-end  >  css上下距离问题_html/css_WEB-ITnose

css上下距离问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:53:221153browse

css中有代码:
.my_box .myleft .article{ width:200px; margin-top:0px;margin-bottom:0;height:295px;}
.my_box .myleft .abox{ width:200px; border:1px #ddd solid;border-top:2px #0a529b solid;padding:1px; height:257px;}
.my_box .myleft .abox .bt{background:url(../images/notice_bt_bg.png) repeat-x; height:36px; display:block;}
.my_box .myleft .abox .switch{ float:left; background:#fff; width:100px; height:36px; border-right:1px #ddd solid; font-size:14px; color:#0f5aa4; line-height:36px; text-align:center; font-weight:bold;}
.my_box .myleft .abox .more{ float:right; padding-right:10px; line-height:36px; color:#666;}
.my_box .myleft .abox .more a{color:#666;}
.my_box .myleft .abox .more a:hover{color:#0a529b;}
.my_box .myleft .abox .ulist{ display:block; padding:5px 10px;}
.my_box .myleft .abox .ulist li{ background:url(../images/icon1.png) no-repeat 0 8px; color:#333; display:block;line-height:26px; padding-left:8px;}
.my_box .myleft .abox .ulist li span{ float:right; color:#666; font-family:Arial;}
.my_box .myleft .abox .ulist li a{color:#333; }
.my_box .myleft .abox .ulist li a:hover{color:#0a529b;}


html中有代码:

 


 


在论坛新帖1新帖与论坛新帖2之间的上下距离居然有33px左右的上下距离,可我定义的 margin-top:0px,这是为什么?请指点!


回复讨论(解决方案)

my_box .myleft .article{ width:200px; margin-top:0px;margin-bottom:0; height:295px;}
.my_box .myleft .abox{ width:200px; border:1px #ddd solid;border-top:2px #0a529b solid;padding:1px;  height:257px;}

是2个 height的 差距把

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