日期:2014-05-17  浏览次数:20613 次

搞不好。。来看下谢谢
id为right和id为foot直接还有20px空格。。。调不了。。。求高手
额。。我的想法可能与大家有异。。
我是这样想的
1:right这部分的增加大约20px;高度,这样刚好与foot相贴
2:砍掉20px;空白的地方,这样right与foot也刚好相帖。。
要么选1要么选2.。。但是我自己弄来弄去弄不好。。求高手
<!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>
</head>
<style type="text/css">
body{background-color:#CCCCCC;
margin:0px;

}
#first{
height:1000px;
width:791px;
margin:auto;
}
#head{
background-image:url(images/top.jpg);
height:14px;
}
#sen{
background-image:url(images/bg.jpg);
width:791px;
height:1000px;
}
#org{
width:172px;
height:129px;
margin-left:15px;
background-color:#FF9900;
}
#tu{
width:587px;
height:129px;
margin-left:188px;
margin-top:-129px;
background-image:url(images/header.jpg);
}
#main{
height:857px;
width:791px;
margin:auto;
}
#left{
width:172px;
height:857px;
margin-left:15px;
margin-top:-871px;
background:url(images/leftbg.jpg) repeat-x;
}
#right{
width:587px;
height:857px;
margin-left:188px;
margin-top:-857px;
background-color:red;
}
#foot{
background-image:url(images/footer.jpg);
width:791px;
height:43px;
}
</style>
<body>
<div id="first">
<div id="head"></div>
<div id="sen">
<div id="org"></div>
<div id="tu"></div>
</div>

<div id="main">
<div id="left"></div>
<div id="right"></div>
</div>
<div id="foot"></div>
</div>

</body>
</html>


------解决方案--------------------
CSS code
#foot {
    background-image:url(images/footer.jpg);
    width:775px;
    height:43px;
}