Introduction to IE8 CSS hack

Source: Internet
Author: User
Tags version
After analysis and summary of the various users of the ineffective methods, with the following effective solution, perhaps there will be better and simpler hack, but for now this method can solve the immediate problem.

CSS compatibility has always been a headache for everyone, IE6, IE7 and FF have been very annoying, in the previous article, a lot of this knowledge introduced. Today to introduce IE8 CSS hack.
IE8 official version of the release, has been looking for a distinction between the IE8 version of the method. In Baidu search "IE8 hack" has more than 190,000 results, Google search has more than 2.43 million results, but hardly see any effective method for the IE8 official version, You know, there's a big difference between the IE8 and the beta in hack. And the network methods are almost all from the hands of one or two people, the most famous may have to count the linxz.cn hack picture, this picture is estimated by the domestic netizens reprinted hundreds of thousands of times, But the method currently in this picture is not valid for the IE8 official edition.
After analysis and summary of the various users of the ineffective methods, with the following effective solution, perhaps there will be better and simpler hack, but for now this method can solve the immediate problem.
Stop talking nonsense, come (the following IE8 refers to IE8 official edition, version number: 8.0.6001.18702):
"\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.
So, you can completely distinguish open IE6, IE7, IE8, Firefox.
What? still don't know how to differentiate. Okay, let's take a look at an example:
<! DOCTYPE <a href= "http://www.blue1000.com/bkhtml/c22/title=" html/javascript Tutorial ">HTML</a> Public"-//w3c DTD XHTML 1.0 transitional//en "" Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">



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.