背景颜色和不同位置的内容

时间:2012-08-10 09:56:51

标签: html css background-color

我有一个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>

0 个答案:

没有答案