关于IE6中无法使用margin:0 auto居中的问题终极解决方案
来源:互联网 发布:php获取unix时间戳 编辑:程序博客网 时间:2024/06/07 06:05
本人刚开始学CSS的时候也遇到过这类问题,网上搜索出来的答案大部分都是使用
属性,其实最简单的方法就是在html文件开始处添加doctype如下,
text-align:center
属性,其实最简单的方法就是在html文件开始处添加doctype如下,
<!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">
这样子IE6下使用margin就能正常居中了。
新手可以在自己的文本编辑器里面添加带doctype的html模板,这样子方便以后使用。下面贴出我editplus里面的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"> <head> <title> new document </title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /><!-- 防止IE8,7进入怪异模式 --> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><!-- 设置编码 --> <meta name="generator" content="" /> <meta name="author" content="" /> <meta name="keywords" content="" /> <meta name="description" content="" /> </head> <body> </body></html>
- 关于IE6中无法使用margin:0 auto居中的问题终极解决方案
- 关于IE6中无法使用margin:0 auto居中的问题解决方案
- margin:0 auto在ie中无法居中问题
- margin(0 auto)无法居中的原因
- margin:0 auto;无法居中
- margin:0 auto; 居中问题
- margin:0 auto; 居中问题
- margin:0 auto; 居中问题
- 当层无法运用margin:0 auto居中问题的解决!
- 无法居中,margin:0 auto;属性
- margin:0 auto;无法居中解决方法
- 无法居中,margin:0 auto;属性
- margin:0 auto;无法居中怎么办?
- 关于jsp页面margin:0 auto;失效导致不居中的问题
- margin:0 auto设置水平居中的问题
- 浅谈margin:0 auto元素居中的问题
- 【CSS】margin:0 auto居中问题
- margin:0 auto;不居中的原因
- Tomcat修改密码问题
- Java HashMap 分析之四:查找和内存使用
- 小鼠引发的毒药检测问题
- poj 2823 Sliding Window(单调队列)
- Driver Debug interface list
- 关于IE6中无法使用margin:0 auto居中的问题终极解决方案
- 进程时间度量[转载]
- css和js引用图片路径
- Android C/CPP log
- vs2010 的 sdf文件 和 ipch文件夹 的设置
- Linux驱动之设备模型(1)
- 分布式文件系统元数据服务模型
- C 内存申请和释放
- 必须要写点什么了