【发布时间】:2011-07-05 11:15:41
【问题描述】:
我被这个问题困住了,无法摆脱这个问题。请帮帮我。
在我的网页中,我在一个容器 div 中使用了 3 个 div。我正在尝试消除 div 之间不需要的间隙。
- (1)顶部背景图片
- (2)中间背景图片
- (3)底部背景图片
我正在尝试调整这 3 个 div,使其看起来像一个背景图像。我的中间部分和底部部分已完全调整,但顶部和中间部分之间有一些差距,我试图移除但无法移除。
请参考我附在此处的图片,该图片显示了顶部和中间部分之间的间隙。请参考我用于放置图片的样式表数据。
提前致谢。
#main_container {
background-repeat:no-repeat;
width:645px;
float:left;
padding-bottom:10px;
overflow:hidden;
height:auto;
}
#middle_part {
background-image: url('/DiscoverCenter/images/apps_mid.png');
background-repeat:repeat-y;
width:645px;
padding-bottom:10px;
overflow:hidden;
height:auto;
clear:both;
position:relative;
display: block;
vertical-align: bottom;
}
#top_part {
background-image:url('/DiscoverCenter/images/apps_top.png');
width:645px;
top:0px;
height:47px; /* actual height of the top bg image */
clear:both;
position:relative;
display: block;
vertical-align: bottom;
}
#bottom_part {
background-image:url('/DiscoverCenter/images/apps_btm.png');
width:645px;
height:24px; /* actual height of the bottom bg image */
}
【问题讨论】:
-
@user515990 你的 HTML 标记是什么?
-
我的意思是 HTML 代码,即具有这些 id 的 DIV。
标签: html gaps-in-visuals