[英]Removing White-space after using “top” tag in CSS
I am working on This site!! 我正在这个网站上工作!! , and I'm having a little problem.
,但我有一个小问题。
I know it may be pretty basic, but I cannot seem to get it to work :/ 我知道这可能是非常基本的,但是我似乎无法使其工作:/
At the bottom of my site, at the footer I have a whitespace which I want removed. 在网站底部的页脚处,我有一个空白要删除。 I have tried using the
margin-bottom
to no avail 我尝试使用
margin-bottom
无济于事
Is there something else I should be doing? 还有什么我应该做的吗?
This is my Code: 这是我的代码:
HTML
的HTML
<div id="footer">
</div>
<div id="bottombanner">
</div>
CSS
的CSS
#footer{
background: url("../images/footer.gif") no-repeat top left;
height: 370px;
overflow: hidden;
z-index: 1000;
position: relative;
}
#bottombanner{
background-color: rgb( 22, 47, 66 );
left: 0px;
width: 100%;
height: 60px;
top: -31px;
z-index: 1;
position: relative;
}
Any Help would be greatly appreciated!! 任何帮助将不胜感激!! Thanks!
谢谢!
Change in #bottombanner
top
to margin-top
. 将
#bottombanner
top
更改为margin-top
。
#bottombanner{
background-color: rgb( 22, 47, 66 );
left: 0px;
width: 100%;
height: 60px;
margin-top: -31px;/*this*/
z-index: 1;
position: relative;
}
replace the property top:-31px
to margin-top:-31px;
将属性
top:-31px
为margin-top:-31px;
for #bottombanner
适用于
#bottombanner
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.