ie下的3px bug两种方法 不指定

Else , 2008/09/30 22:18 , 代码片段,演示也有 , Comments(2) , Reads(2636) , Via Original
这个是官方推荐的方法,通过dw的验证
这里的代码

ie下会多3px;
.cls6_1,.cls5_1{margin-left:8px;}


加head上面加这个,加zoom
<!--[if IE]>
<style type="text/css">
.cls6_1,.cls5_1{margin-left:5px;zoom:1;}
.cls5_2{margin-left:298px;margin-right:254px;zomm:1;}
.cls6_2,.cls5_3{margin-right:5px;zoom:1;}
</style>
<![endif]-->

ps.........................................................
昨天的排版,今天挖错,我的排版中是用4px和8px,在fw下对比,左右两边正常!无逢链接!



另一种在外面加一个大的div 来解决,这里float:left;


<div style="margin-left:10px; margin-right:10px;border:solid 0px #99BBDD; clear:left;">
<div style="border:solid 1px #99BBDD;width:281px;height:300px;float:left;">asd<img src="images/flash.jpg" width="280" height="195" /></div>
<div style="border:solid 1px #99BBDD; width:235px;float:right;height:300px;">right</div>
<div style="border:solid 0px #99BBDD;width:373px; float:left; height:357px;margin-left:8px;background-image:url(images/zz_bg.gif);  background-repeat: no-repeat;">mid</div>
<div style="clear:both;"></div>
</div>
Tags: , , , ,
65765
2009/10/28 13:51
esleepyzan
xx
2009/08/24 11:04
question
Pages: 1/1 First page 1 Final page
Add a comment

Nickname

Site URI

Email

Enable HTML Enable UBB Enable Emots Hidden Remember [Login] [Register]