2012-08-06 35 views
0

Before-image添加另一个图像后的额外间隙

这是在添加页脚文本之前。页脚图像在页面底部很好地放置。

After-image

这是我后添加页脚文本。

我找不到在页面底部导致神秘的额外空白的问题。忽略黑色边框 - 我用它来检查页脚文本图像的边距。

CSS:

* { 
    margin: 0; 
    padding:0; 
} 



body { 
    background-image: url('images/BG-W1.png'); 
} 
#container{ 
    max-width:1000px; 
    margin: 0 auto; 
    position: relative; 
    padding: 0 auto; 
    height: 790px; 
    border: 2px solid blue; 

} 

#footerBg { 
    position: relative; 
    bottom:-63px; 
    left:-50px; 
} 

#footerBg img { 
    display: block; 
} 

#footertex { 
    position: relative; 
    top:-110px; 

    border:2px solid black; 

} 
footer { 
    height: 50px; 
} 

#footertex img { 
    display: block; 
} 

HTML:

<footer> 
      <figure id="footerBg"> 
       <img src="images/BG_F_S3.png" alt="Footer Background" width="" height="" /> 

      </figure> 

     <<figure id="footertex">  
        <img src="images/ft1.png" usemap="#green" border="0" /> 

        <map name="green"> 

        <area shape="rect" coords="513,56,625,106" href="http://www.google.com" /> 
        <area shape="rect" coords="725,58,874,108" href="http://www.google.com" /> 

        </map> 
     </figure> 

     </footer> 
+2

你可以发布你的一些CSS和HTML吗? – JSW189 2012-08-06 13:15:00

+0

我有点困惑,你能告诉我们你的html吗? – Undefined 2012-08-06 13:15:40

+0

已发布。哦,天哪,当时完全忘了发布代码。 – TheKraven 2012-08-06 13:23:55

回答

1

您可以发布您的HTML & CSS代码?想到一个快速解决方案将是div#footer { box-sizing: border-box; },但显示你已经拥有的将有希望让你更好的答案。

+0

'之前有一个额外的开放标签。另外,我不明白你为什么对你的页脚元素有这么多的负面定位。本质上,你的''将位于其父元素'
'之外。这是故意的吗? – carmat 2012-08-09 14:53:31

相关问题