Min-width in MSIE 6

前端 未结 11 1432
一生所求
一生所求 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条回答
  • 2020-12-16 06:08

    I dunno, I had some success with:

        min-width: 193px;
        width:auto !important; 
        _width: 193px;  /* IE6 hack */
    

    A combination of dustin diaz' min-height fast hack & How do I specify in HTML or CSS the absolute minimum width of a table cell

    0 讨论(0)
  • 2020-12-16 06:08

    Min-height fast hack works for me (also works for width)

    0 讨论(0)
  • 2020-12-16 06:11

    do your css tag as _Width: 500px or whatever.

    0 讨论(0)
  • 2020-12-16 06:14
    foo { min-width: 100px }      // for everyone
    * html foo { width: 100px }   // just for IE
    

    (or serve a separate stylesheet to IE using conditional comments)

    0 讨论(0)
  • 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");
    
    0 讨论(0)
  • 2020-12-16 06:18

    Single line button

    button{
    background-color:#069;
    float:left;
    min-width:200px;
    width:auto !important;
    width:200px;
    white-space: nowrap}
    
    0 讨论(0)
提交回复
热议问题