IE6\7下的margin问题
时间:2011-09-16
来源:互联网
废话不说,有以下的HTML+CSS代码,在IE8\FF\CHROME下都是正常的显示,在IE6\7下会出现重叠现象,希望有朋友能告知原因并给出解决方案:
HTML code
想实现一个整体两列, 左列又分上下两栏的布局。
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>阿里题1</title> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"> <style type="text/css"> #container{ position:relative; margin: 200px auto; width:300px; height:300px; } .hoverEnlarge { background: #CDD8DA; } .leftTopColumn { position: absolute; /* left: 0; top: 0;*/ width: 90px; height: 150px; z-index: 999; } .leftBottomColumn { position: absolute; width: 90px; height: 115px; margin-top: 157px; z-index: 998; } .rightColumn { /*position:absolute; left: 97px;*/ margin-left:97px; width: 215px; height: 270px; } </style> </head> <body> <div id="container"> <div class="leftTopColumn hoverEnlarge"></div> <div class="leftBottomColumn hoverEnlarge"></div> <div class="rightColumn hoverEnlarge"></div> </div> </body> </html>
想实现一个整体两列, 左列又分上下两栏的布局。
作者: dxx1988 发布时间: 2011-09-16
`````````````````````````````````
作者: dxx1988 发布时间: 2011-09-16
靠, 知道原因拉。。。 #container{
position:relative;
margin: 200px auto;
width:300px;
height:300px;
}
margin:200px auto; 这句去掉就可以了= =~~!!!
position:relative;
margin: 200px auto;
width:300px;
height:300px;
}
margin:200px auto; 这句去掉就可以了= =~~!!!
作者: dxx1988 发布时间: 2011-09-16
= =~~~ 哎哟, 昏头了。。 去掉也是不行的。。。
作者: dxx1988 发布时间: 2011-09-16
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>阿里题1</title> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"> <style type="text/css"> #container{ margin: 200px auto; width:300px; height:300px; } .hoverEnlarge { background: #CDD8DA; } .leftTopColumn { position: absolute; width: 90px; height: 150px; z-index: 999; } .leftBottomColumn { position: absolute; width: 90px; height: 115px; margin-top: 157px; z-index: 998; } .rightColumn { position:absolute; margin-left:97px; width: 215px; height: 270px; } </style> </head> <body> <div id="container"> <div class="leftTopColumn hoverEnlarge"></div> <div class="leftBottomColumn hoverEnlarge"></div> <div class="rightColumn hoverEnlarge"></div> </div> </body> </html>
作者: jiancm2001 发布时间: 2011-09-16
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28