引用:
原帖由 webflash 于 2007-3-28 18:36 发表
不知道这位热情的网友是用什么IE版本的,本人用IE6.0测试并没有问题,你可以看一下下面网页的源代码:
http://www.hsptc.com/css2.html
在用margin: 0px auto;之前,也给BODY重新指定了一个宽度width: ...
其实
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
margin: 0px auto;
height: auto;
width: 760px;
border: 1px solid #006633;
}
并不能居中。
在<html>前引入
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
即可居中,够标准。呵呵
楼主教程非常棒,非常适合新手。建议陆续推出新教程。辛苦了。非常感谢。
[
本帖最后由 pokalu 于 2007-4-7 16:01 编辑 ]