打印

[讨论] div在IE6.0中,底部边框内被撑大的原因!

我在做DIV布局时,DIV的底部总是会出现大约5像素的宽度,为什么呢!
.move_con{
height:165px;
width:344px;
border:1px #ccc solid;
float:left;
margin-right:5px;
margin-bottom:5px;
margin-top:0px;
}
.con_title{
height:24px;
background:url(../images/content_title.jpg);
background-repeat:repeat-x;
border-bottom:1px #66CCFF dotted;
}
.con_center {
height:129px;
}
.con_foot {
height:11px;
background:url(../images/content_foot_bg.jpg);
background-repeat:repeat-x;
}

当DIV元素里没图片时IE6正常

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
.con{
height:200px;
width:200px;
border:1px #FF0000 solid;
}
.title{
height:30px;
background:#999999;
}
.content {
height:159px;
background:#FFFFCC;
}
.foot{
height:11px;
border:1px #333333 solid;
}
</style>
</head>

<body>
<div class="con">
     <div class="title">标题title</div>
     <div class="content">内容</div>
     <div class="foot"></div>
</div>
</body>
</html>

现在加入背景图片,当初的情况则会看到了? 为什么呢!!!大家讨论下吧

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
.con{
height:200px;
width:200px;
border:1px #FF0000 solid;
}
.title{
height:30px;
background:#999999;
}
.content {
height:159px;
background:#FFFFCC;
}
.foot{
height:11px;
background:url(images/content_foot_bg.jpg);
background-repeat:repeat-x;
}
</style>
</head>

<body>
<div class="con">
     <div class="title">标题title</div>
     <div class="content">内容</div>
     <div class="foot"></div>
</div>
</body>
</html>