我的页面里两个div之间莫名其妙有一行空白,chrome下面没有,ie内核的有
css文件/*布局*/{PADDING:0px;MARGIN:0px;}BODY{FONT-SIZE:12px;COLOR:#333;margin:0px;}td,p,l...
css文件
/*布局*/
{
PADDING: 0px; MARGIN: 0px;
}
BODY {
FONT-SIZE: 12px;
COLOR: #333;
margin: 0px;
}
td,p,li,ul,select,input,textarea,div{
FONT-SIZE: 12px;
COLOR: #333;
list-style-type: none;
}
h1,h2,h3,h4,h5,h6 {
margin:0;
padding:0;
font-weight:normal;
}
form{
MARGIN: 0px;
}
#top {
width:765px;
margin:0 auto;
}
#content {
width:765px;
margin:0 auto;
}
/*内容*/
#conBgLeft {
float:left;
width:2px;
height:880px;
background-image: url(blue-border.gif);
background-repeat: repeat-y;
}
#conBgCenter {
float:left;
width:761px;
height:880px;
background-image: url(bg_3.gif);
background-repeat: repeat-x;
background-color:#e8dec5;
}
#conBgRight {
float:right;
width:2px;
height:880px;
background-image: url(blue-border.gif);
background-repeat: repeat-y;
}
.tem {
float:left;
width:214px;
margin:12px 2px 0 18px;
*margin:12px 2px 0 18px;
_margin:12px 2px 0 11px;
overflow: hidden;
}
.temTop {
float:left;
}
.temCon {
float:left;
width:212px;
margin-top:4px;
}
.temConTB {
float:left;
width:100%;
}
.temConCenterB {
float:left;
width:100%;
}
.temConCenterBig {
float:left;
width:208px;
background-color:#FFF;
border-left: 2px solid #c81515;
border-right: 2px solid #c81515;
}
.temConCenter {
float:left;
width:208px;
height:259px;
overflow:scroll;
overflow-x:hidden;
}
.temConCenter ul {
width:90%;
height:240px;
margin:0 auto;
padding:0;
}
.temConCenter li {
float:left;
width:100%;
border-bottom: 1px dotted #999;
margin-bottom:8px;
}
.temConCenter li cite {
float:right;
font-size: 14px;
font-weight: bold;
color: #FF3300;
font-style: normal;
}
页面代码:
<body>
<div id="top">
<img src="images/top3.jpg" width="765" height="224" />
</div>
<div id="content">
<div id="conBgLeft"></div>
<div id="conBgCenter"></div>
就是在top 和 content之间多了一行空白,有大概2个像素吧,chrome浏览器下正常的, 谁知道怎么改啊。 展开
/*布局*/
{
PADDING: 0px; MARGIN: 0px;
}
BODY {
FONT-SIZE: 12px;
COLOR: #333;
margin: 0px;
}
td,p,li,ul,select,input,textarea,div{
FONT-SIZE: 12px;
COLOR: #333;
list-style-type: none;
}
h1,h2,h3,h4,h5,h6 {
margin:0;
padding:0;
font-weight:normal;
}
form{
MARGIN: 0px;
}
#top {
width:765px;
margin:0 auto;
}
#content {
width:765px;
margin:0 auto;
}
/*内容*/
#conBgLeft {
float:left;
width:2px;
height:880px;
background-image: url(blue-border.gif);
background-repeat: repeat-y;
}
#conBgCenter {
float:left;
width:761px;
height:880px;
background-image: url(bg_3.gif);
background-repeat: repeat-x;
background-color:#e8dec5;
}
#conBgRight {
float:right;
width:2px;
height:880px;
background-image: url(blue-border.gif);
background-repeat: repeat-y;
}
.tem {
float:left;
width:214px;
margin:12px 2px 0 18px;
*margin:12px 2px 0 18px;
_margin:12px 2px 0 11px;
overflow: hidden;
}
.temTop {
float:left;
}
.temCon {
float:left;
width:212px;
margin-top:4px;
}
.temConTB {
float:left;
width:100%;
}
.temConCenterB {
float:left;
width:100%;
}
.temConCenterBig {
float:left;
width:208px;
background-color:#FFF;
border-left: 2px solid #c81515;
border-right: 2px solid #c81515;
}
.temConCenter {
float:left;
width:208px;
height:259px;
overflow:scroll;
overflow-x:hidden;
}
.temConCenter ul {
width:90%;
height:240px;
margin:0 auto;
padding:0;
}
.temConCenter li {
float:left;
width:100%;
border-bottom: 1px dotted #999;
margin-bottom:8px;
}
.temConCenter li cite {
float:right;
font-size: 14px;
font-weight: bold;
color: #FF3300;
font-style: normal;
}
页面代码:
<body>
<div id="top">
<img src="images/top3.jpg" width="765" height="224" />
</div>
<div id="content">
<div id="conBgLeft"></div>
<div id="conBgCenter"></div>
就是在top 和 content之间多了一行空白,有大概2个像素吧,chrome浏览器下正常的, 谁知道怎么改啊。 展开
1个回答
展开全部
这个是IE6常出现的问题 一般div里单独放一个img的 时候会出现 空白
你给 #top 这边加进去 font-size:0 就没问题了
#top {
width:765px;
margin:0 auto;
font-size:0;
}
你给 #top 这边加进去 font-size:0 就没问题了
#top {
width:765px;
margin:0 auto;
font-size:0;
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询