IE6 does not support min-height how to solve the high adaptive problem, ie6min-height

Source: Internet
Author: User

IE6 does not support min-height how to solve the high adaptive problem, ie6min-height

IE6 does not support min-height:
Suggestion: writing code as much as possible can effectively improve learning efficiency and depth.
There are many problems with IE6, which brings you a lot of troubles. Here we will introduce the issue that the IE 6 browser does not support the min-height attribute, which leads to the issue that the height cannot be adaptive. In other standard browsers, we can use the min-height attribute to specify a minimum height for the container. If the content exceeds this minimum height, the container will be automatically opened to achieve highly adaptive effect, however, IE6 does not support this attribute. However, IE6 itself has a highly adaptive feature. You may think that the highly adaptive effect can be achieved by using both the height and min-height attributes. For example:

<! DOCTYPE html> 

According to the running results, IE6 achieves highly adaptive effect. However, in other standard browsers, the container height is PX, resulting in overflow because the min-height attribute is overwritten by the height attribute. The above CSS code is equivalent to the following code:

width:100px;height:100px;border:1px solid green;

The CSS code is modified as follows:

width:100px;height:auto!important;height:100px;border:1px solid green;

Height: auto is added to the Code! Important, so we can achieve highly adaptive effect, but because height: auto! Important has a higher priority than height: Px, so it does not have the minimum height effect. Modify the code again:

width:100px;height:auto!important;height:100px;min-height:100px;border:1px solid green;

The above CSS code can be compatible with the highly adaptive problem of all browsers.

The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 3387.

For more information, see: http://www.softwhy.com/divcss/

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.