【发布时间】:2011-04-14 23:39:24
【问题描述】:
我用了以下
<body topmargin="0" leftmargin="0" rightmargin="0">
仅适用于 IE6。我希望它可以与 firefox 和 opera 一起使用。
我尝试了以下操作:
<style type="text/css">
.header {
width: 100%;
background-color: #3B5998;
height: 35px;
margin-top:0;
}
.style1 {
margin-right: 38px;
}
.style2 {
width: 100%;
background-color: #3B5998;
height: 35px;
}
</style>
<div dir="rtl" class="style2" style="width: 100%">
<p align="center"style="width: 92px; height: 32px; font-family: Arial, Helvetica, sans-serif; font-size: 20px; color: #EFF1F6;" class="style1"></p>
</div>
</body>
【问题讨论】:
-
通常你让它在其他所有东西上工作,然后处理 IE6 - 你得到它反过来!
-
<p>导致您的问题。尝试将其边距归零也可以看到。并检查 Alex 提供的collapsing margins链接作为对他的回答的评论。 -
@Dampe :它的工作原理谢谢 Dampe