IE6的效果
#content .text{ margin-top:23px; border:1px solid #99FF00; overflow:hidden; height:200px;}
我发现是 设置了高度的原因 如果我不设置高度margin-top:23px可以生效 如果设置高度那么就成IE6那种情况了
无标题文档
body,h4{ margin:0; padding:0}
/*头部 header*/
#header,#menu{ width:960px; margin:0 auto}
#hcolumn{ background:#FFFAFA; height:35px; line-height:35px}
#hcolumn a{ margin: 0 5px; float:left; text-decoration:none}
.logo{ width:960px; display:block; margin-bottom:5px}/*display:block 兼容IE下图片有2像素的白框*/
/*导航栏 menu*/
#menu{ height:50px}
#menu .nav ul{ list-style:none; margin:0; padding:0}
#menu .nav ul li{float:left}
#menu .nav ul li a { display:block; height:50px; line-height:50px; float:left; padding:0 18px; background:url(images/b02.gif); text-decoration:none; color:#FFFFFF; font-weight:bold}
#menu .nav ul li a:hover{ color:#00FF00} /*#A52021*/
#menu .mn_left,.mn_right{height:50px; width:9px; float:left}
#menu .mn_left{background:url(images/b01.gif) no-repeat;}
#menu .mn_right{background:url(images/b03.gif) no-repeat;}
/*内容 content*/
#content{width:960px; margin:0 auto;}
#content .left{ float:left; border:1px solid #00FF00; width:300px; height:300px}
#content .right{ float:right; border:1px solid #00FF00; width:300px; height:300px}
#content .center{ height:300px; width:328px; border:5px solid #EAEAEA; margin:8px auto; position:relative}
#content .bgimg{ background:url(images/b09.gif) no-repeat; width:25px; height:25px; position:absolute; top:-5px; left:-4px}
#content .text{ margin-top:23px; border:1px solid #99FF00; overflow:hidden; height:200px;}
#content .title{ margin:0 auto; text-align:center;}
#content .bottom{ border:1px solid #FF0000; clear:both}
登录注册
查看更多关于因为设置height,margin-top:23px无效IE6兼容_html/css_WEB-ITn的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did104702