我正在尝试使用for 6 for min-width的解决方法。
请参阅以下代码
<!--[if lte IE 6]>
<style type="text/css">
.left_2 {width:expression(document.body.clientWidth < 137? "135px": "21.5%" ) !important; padding-left:7.5px; padding-right:7.5px; height:auto; float:left;}
</style>
<![endif]-->
<style type="text/css">
.left_2 { min-width:135px; width:21.5%; padding-left:7.5px; padding-right:7.5px; height:auto; float:left; }
</style>
然而,这似乎对ie6和ie7都没有任何影响。我甚至将doctype设置为严格,以使这个工作为7 ...什么是错的?
编辑:这是你的意思吗? <style type="text/css">
.left_2 { min-width:135px; width:21.5%; padding-left:7.5px; padding-right:7.5px; height:auto; float:left; }
</style>
<!--[if lte IE 6]>
<style type="text/css">
.left_2 {width:expression(document.body.clientWidth < 137? "135px": "21.5%" ) !important;}
</style>
<![endif]-->
答案 0 :(得分:0)
IE6看到了什么:
将“width”设置为表达式的结果
将“宽度”设置为21.5%
将条件注释放在常规样式之后,而不是之前。