在IE与FF中如何居中的css写法

IE方法:<body style="text-align:center;">
<body> 标记内的内容居中。
非IE方法:<div style="margin-left:auto;margin-right:auto;"></div>
<div> 标记的左右边距自动适应,以达到居中效果。
标准推荐的CSS使用方法是后者,IE的那套是非标准的。
不过在IE6中使用标准的DTD声明(xhtml版本),也能使用margin:0 auto;方法达到居中效果。