html - Firefox 中 div 下的间隙

标签 html css

我有这个带有 wordpress 主题的 html

div class="fullWidthDarkBlue">
<div class="hpRentArrears">
<section id="black-studio-tinymce-8" class="widgetcontainer widget_black_studio_tinymce"><div class="textwidget"><h2>Rent Arrears</h2>
<p>Does ...t on your behalf.</p>
</div>
</section>
</div>
<div class="clearer"></div>
</div>
<div id="footer">...

还有一些像这样的 CSS:

#footer {
margin-top:0px;
border:none;
}

.fullWidthDarkBlue {
width:100%;
background:#365162;
padding-top:30px;
}

.hpRentArrears {
width:346px;
float:left;
background:#f2f1ed;
border:2px solid #a7cfdb;
}

.hpRentArrears p {
margin:0;
}

.clearer {
clear:both; 
}

除在 FF 中深蓝色框底部和页脚之间有间隙外,一切正常。我发现我可以通过在 #footer 上添加边框来消除这个差距 - 但我真的不想

shows offending gap

是什么导致了这个差距,我该如何消除它?

最佳答案

我测试了您的代码,它在 ff、safari 和 chrome 中运行良好。必须是页脚内部的元素,它会产生一些边距。

分享您的代码,我会修复它。

关于html - Firefox 中 div 下的间隙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26636573/

相关文章:

Javascript 比较 value.length 是否等于一定数量的字符

html - 如何根据div的高度将文本分成多行并在末尾添加省略号?

jQuery DataTables column.width 选项未按预期工作

html - 在具有 100% 高 css 元素的 html 页面中添加顶部导航栏

CSS 和按钮 : How to override native CSS of html buttons element?

html - 调整大小时(响应式)从图像到文本(填充)的距离相同

css 子 (>) 选择器在 IE8 中不起作用?

php - 如何实现辅助文档准备功能?

html - 如何对多个图像施加相同的效果,但不影响我没有悬停的图像?

javascript - 在 onSubmit 之前创建一个 onClick 事件