引用:
原帖由 dokyo 于 2007-11-25 13:00 发表 
我把是和你说了吗?利用!important
!important 能被IE7正常读取运行,以后做风格不要用!important
-----//css兼容IE6 IE7 FF两种写法-----------------------------------------------------------------------------------------------
用firefox游览器,加上IE6游览器同时测试,如果两个同时正常,一般IE7也会正常。
CSS Hack
第一种写法:css代码
height:20px; /*For Firefox*/
*height:25px; /*For IE7 & IE6*/
_height:20px; /*For IE6*/
如果写成
*height:25px; /*For IE7 & IE6*/
_height:20px; /*For IE6*/
那么IE6会用哪一个呢?后者。
---------------------------------------------------------------------
其实个人认为这种注释方面写css hack比较方便
第二种写法:css代码
div#milkr{width:200px;} /*-for ff-*/
* html div#milkr{width:180px;} /*-for ie6-*/
*+html div#milkr{width:150px;} /*-for ie7-*/
而且互不影响.效果不错