Solution for IE6 to support maximum height and minimum height

Source: Internet
Author: User

1. IE6 supports the max-Height Solution
IE6 supports CSS code at the maximum height:
. Yangshi {max-Height: 1000px; _ Height: expression((document.doc umentelement. clientheight | document. Body. clientheight)> 1000? "1000px": ""); overflow: hidden ;}

Note: Max-Height: 1000px; this is the maximum range of height supported by IE6 browsers of other brands. And _ Height: expression(document.doc umentelement. clientheight | document. Body. clientheight)> 1000? "1000px": ""); overflow: hidden; enables IE6 to support max-height instead of CSS code, but the effect is the same as that of other browsers.

Make all browsers support the CSS code of max-height, complete:
Max-Height: 1000px; _ Height: expression(document.doc umentelement. clientheight | document. Body. clientheight)> 1000? "1000px": ""); overflow: hidden; 1000 and 1000px here are the values you need. Note that the three values are the same.

When IE6 supports max-height, do not forget to add overflow: hidden;

2. IE6 supports Min-Height Solution
IE6 supports CSS code at the minimum height:
. Yangshi {Min-Height: 1000px; _ Height: expression((document.doc umentelement. clientheight | document. Body. clientheight) <1000? "1000px ":"");}

Note: Min-Height: 1000px; this is the smallest range of height supported by IE6 browsers of other brands. And _ Height: expression(document.doc umentelement. clientheight | document. Body. clientheight) <1000? "1000px": ""); this means that IE6 supports Min-height instead of CSS code, but the effect is the same as that of other browsers.

Make all browsers support the CSS style code of Min-height, complete:
Min-Height: 1000px; _ Height: expression(document.doc umentelement. clientheight | document. Body. clientheight) <1000? "1000px": ""); overflow: hidden; _ overflow: visible; 1000 and 1000px here are the values you need. Note that the three values are the same.

3. IE6 supports max-height and Min-height.
Allow all browsers, including IE6, to support both the maximum and minimum heights.
. Yangshi {max-Height: 620px; Min-Height: 40px; _ Height: expression (this. scrollheight> 620? "620px": (this. scrollheight <40? "40px": "Auto "));}

IE6 supports max-height and Min-height CSS code.
_ Height: expression (this. scrollheight> 620? "620px": (this. scrollheight <40? "40px": "Auto "));

Solution for IE6 to support maximum height and minimum height

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.