IE6中div background 高度问题

上中下DIV并排结构IE6下出现的问题:上层下方有空白!!

代码:
html:

<div class=”dj-top”></div>

<div class=”dj-center”>

…………

</div>

<div class=”dj-bottom”></div>

css:

.dj-top
{
height:8px;
background:url(../images/tjjjr-top.gif) no-repeat;
}

.dj-bottom
{
height:9px;
background:url(../images/tjjjr-bottom.gif) no-repeat;
}

.dj-center
{
height:248px;
background:#F6F6F4;
border-left:1px solid #EBEBEB;
border-right:1px solid #EBEBEB;
width:291px;
}

出现问题:

如图:top的下方会有一段空白,不论设置高度多少,除非是0px,否则一直存在!

解决方法?:

在.dj-top中加上

{overflow:hidden;}

问题解决!!

未经允许不得转载:WEIXING.ME » IE6中div background 高度问题

相关文章

评论 (0)