Make CSS compatible with IE7 and IE8

Source: Internet
Author: User
Tags add xml example
With the IE8 of more and more extensive installation applications, the compatibility of IE7 and IE8 is also a matter of concern.

CSS compatibility problem is already a CSS page layout technology is an important part of the vast number of csser headaches, with the IE8 more and more extensive installation applications, IE7 and IE8 compatibility issues, but also quite concerned about.
Today we are going to show you how to solve the compatibility problem of IE7 and IE8.

Microsoft offers three modes of parsing pages in IE8
IE8 Standard Modes: The default of the most standard mode, strictly in accordance with the relevant rules of the Consortium
IE7 Standards MODES:IE7 is now used to parse the Web page mode, open the organization is in Quirks MODES:IE5 used to parse the model of the Web page, the open authority is to delete the HTML top of the DOCTYPE declaration
Note: Pages in different modes can frame each other in IE8, therefore, because the DOM and CSS rendering is not the same, it will cause a lot of problems, it is important to note that if your page is IE7 compatible with no problem, and do not want to modify the existing code in large quantities, but also in the IE8 normal use, Microsoft said, Developers only need to add a line of code to the currently compatible IE7 Web site to solve the problem, as follows:

Div css xhtml xml Example source code Example source code [www.52css.com]
<meta http-equiv= "x-ua-compatible" content= "ie=7"/>

IE8 Latest CSS hack:

"\9" Example: "margin:0px auto\9;". Here the "\9" can distinguish all IE and Firefox.
"*" IE6, IE7 can be identified. IE8, Firefox can't.
"_" IE6 can Identify "_", IE7, IE8, Firefox can not.



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.