There are many differences between IE6 and IE7 in their interpretation of CSS. Today we will talk about one of them: height. example: Copy code The code is as follows: <div style="height:50px"> Under IE6: If the content height in the DIV does not exceed 50px, the height of the DIV is 50px. If it exceeds the set value, the height will expand with the content, which is usually called adaptive height. Under IE7: If the height of the content in the DIV does not exceed 50px, the height of the DIV is 50px. If it exceeds the set value, the height of the DIV will still be fixed at 50px, and the excess content will exceed the DIV and overflow. If there is other content under the DIV, it will overlap with the overflowing content. This is obviously a very important point, if not handled it will cause page disorder. There are usually two ways to solve this problem: 1. Focus on height: fix the height of DIV to 50px, hide the extra content, and write the CSS for both browsers as follows: Copy code The code is as follows: <div style="height:50px;overflow:hidden"> overflow:hidden is very important, compatibility depends on it2. Content-oriented: Set the minimum DIV height to 50px. When there is too much content, the DIV height will adapt to the content. At this time, CSS HACK is needed to do some compatibility processing: <div style="min-height:50px;_height:50px;">, min-height:50px minimum height, this IE7 and FF can recognize, _height:50px is underlined for the purpose of only allowing IE6 to recognize it. |
>>: The latest Linux installation process of tomcat8
Special note: Only the Swoole extension is instal...
Usually a CSS selector selects from top to bottom...
1. Force no line break and end with an ellipsis. C...
Configuration steps 1. Check whether DNS is confi...
1. Install mysql: udo apt-get install mysql-serve...
Using the Docker run command docker run -d -p 920...
This article shares with you the detailed install...
Why do you need to learn CSS overflow mechanism i...
Table of contents 1. What is Promise 2. Basic usa...
Table of contents 1. Modify the my.cnf file of se...
There are many differences between IE6 and IE7 in ...
The most common, most commonly used and most gener...
In an unordered list ul>li, the symbol of an u...
This article example shares the specific code of ...
Table of contents 1. Simple page example 2.uni-ap...