Compatible with some of the CSS hack that ie6,ie7 and Firefox can use:

Source: Internet
Author: User

Some of the problems are the browser itself, and the problem can not be avoided, it is necessary to consider the use of some CSS hack, the following is for
Some of the CSS hack that ie6,ie7 and Firefox can use:
(1)




A: For the difference between IE6 and Ie7/firefox, you can follow the code to distinguish between the following!important
Note: IE6 also knows!important, as long as IE7/IE8/FF takes precedence over the properties of!important.
Example: #test {
Float:left;
(1)
(2)
}
Final display: IE6 test is red, and Ie7/ie8/ff first executes (1), so test is blue

B: For Ie7/firefox in front of the CSS add [xmlns], such as the Left property below, if I want to only work for Ie7/ie8/firefox, the wording as
Under
[xmlns] #ltest {
line-height:28px; Color:rgb (101, 95, 87); font-size:16px; Orphans:2; Widows:2; " > border:4px solid #999;
padding:5px;
width:200px;
height:200px;
}

C: only works for IE6
(1) You can underline the attribute before it:
*html #test {

_ line-height:28px; Color:rgb (101, 95, 87); font-size:16px; Orphans:2; Widows:2; " }
(2) You can add HTML to the front of the CSS, such as:
*html #test {
line-height:28px; Color:rgb (101, 95, 87); font-size:16px; Orphans:2; Widows:2; " }

D: Only for IE7 function, in front of the CSS add *+html, such as:
*+html #test {

}

E: For IE6/IE7/IE8 awareness, FF does not know, after the CSS property value plus \9, such as:
#test {


}

(2)
Downgrade all browsers above IE7 to IE7 without adjusting IE8 and the above compatibility

Source: http://xiaogai1010.blog.163.com/blog/static/137170308201224094398/

Compatible with some of the CSS hack that ie6,ie7 and Firefox can use:

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.