我使用了以下代码。
<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>
<p>
标签可能是引起问题的原因。尝试将其边距设为零并查看 Alex 在他的回答评论中提供的collapsing margins
链接。 - Damb