CSS differences in Internet Explorer 6, 7, and 8

Source: Internet
Author: User
Keywords Web page production CSS Tutorials
Tags browser browsers class close coexist community development development community

One of the most bizarre statistics about browsers is that internet Explorer version 6,7 and 8 coexist. As of this article, Internet Explorer releases a total of about 65% of the market share. In the website development community, this number is much smaller, the statistics show about 40%.

The interesting part of these statistics is that the values between IE6, IE7, and IE8 are very close, which prevents a single Microsoft browser from dominating--contrary to what it used to be. Based on these unfortunate statistical results, it is necessary for developers to test all the current IE browsers in a comprehensive way when developing a Web site for their clients, and can also attract more users on personal projects.

Thanks to those JavaScript libraries (frames), the test of Cross-browser JavaScript is as close to perfection as the current situation allows. But in CSS development is not the case, especially related to IE currently exists in three versions.

This article attempts to provide a detailed, easy-to-use reference for different developers who want to learn about CSS's support for IE6, IE7, and IE8. This reference contains an overview and compatibility of the following:

A, one support in three browsers and two other unsupported entries

B, two support in three browsers and another unsupported entry

This article does not discuss:

A, three browsers do not support entries

B, private properties

Therefore, the center of this article is different in three browsers rather than the necessary support flaw. The list is divided into the following five sections:

1, selector and inheritance

2, pseudo class and pseudo element

3, Property support

4, other kinds of technology

5. Important Bugs and incompatibilities

1, selector and inheritance

A, the sub-selector

Example

body > P {


color: #fff;


}

Description

The child selector selects all the direct child elements of a particular parent element, in the example above, the body is the parent element, and P is a child element.

Support situation

IE6 No





IE7 Yes





IE8 Yes

Bugs

IE7, if there is an HTML annotation between the parent label and the child label, the child selector will not work.

B, Chain category

Example

CLASS1.CLASS2.CLASS3 {


background: #fff;


}

Description

A chain class is used to send an HTML element with multiple class declarations, like this:

<div class= "Class1 class2 class3" >


<p>content here.</p>


</div>

Support situation

IE6 No





IE7 Yes





IE8 Yes

Bugs

IE6 seems to support this situation because it can match the last class in the chain to the element that uses that class, however, it does not restrict an element that uses all the classes in the chain.

C, Property Selector

Example

A[href] {


color: #0f0;


}
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.