【发布时间】:2011-04-25 09:27:21
【问题描述】:
它总是说css代码margin:0 auto;不能让元素在IE6中居中
但我发现如果我在html代码中设置文档类型,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
当我创建 html 页面时在 Visual Studio 2010 中自动创建的
margin:0 auto; 可以让 html 元素在 IE6 中再次居中
那么为什么文档类型会起作用?这个文档到底是什么意思?
谢谢
【问题讨论】:
标签: types internet-explorer-6 document