我有一个包含图像和一些文本的 div,并且有一个背景颜色。然而,当它在 chrome 和 firefox 上渲染时,背景颜色不在位置,div 内容在正确的位置,但它在 IE8 中工作正常,我只是无法理解可能导致这种情况的原因,它是一个皇家那里疼我告诉你...
<div style="width:800px;margin-left:auto;margin-right:auto;background-color:yellow;">
<div style="height:30px;">
</div>
<div style="width:400px;height:150px;">
<div style="float:left;padding:none;padding-top:40px;padding-left:30px;">
<img src="warning.jpg" style="float:left;"/>
</div>
<div style="width:300px;float:left;padding-left:10px;padding-right:10px;">
<h6 style="font-family:Palatino Linotype;font-size:12px;">
Do not give your personal information to anyone you have not met over the internet or phone, or send money to anyone without verifying what you are paying for. lokalboard.com will not be responsible for any loss on third party transactions made between its users.
</h6>
</div>
</div>
</div>