Min-width in MSIE 6

前端 未结 11 1491
一生所求
一生所求 2020-12-16 05:35

What is the definitive way to mimic the CSS property min-width in Internet Explorer 6? Is it better not to try?

11条回答
  •  猫巷女王i
    2020-12-16 06:16

    Use conditional comments to reference and MSIE 6 specific style sheet, then create CSS as below.

    Compliant browsers will use:

    min-width: 660px;
    

    Then MSIE 6 will use:

    width: expression((document.body.clientWidth < 659)? "660px" : "auto");
    

提交回复
热议问题