Compatible Ie6/ie7/ie8/firefox CSS hack

Source: Internet
Author: User
Keywords Web page production CSS Tutorials
Tags class content firefox hack html http note official

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "
<html xmlns=" "
<head>
< Meta http-equiv= "Content-type" content= "HTML; Charset=utf-8 "/>
<title> distinguish IE6, IE7, IE8, Firefox css Hack</title>
<style type=" Text/css "
<!--
#test, #note {
 margin:0 auto;
 text-align:center;
}
. note{text-align:left text-indent:40px;
#test {
 width:200px
 height:30px
 border:1px solid #000000;
 color: #fff;
 line-height:30px;
}
. color{
 background-color: #CC00FF; /* All browsers will be displayed as Purple */
 background-color: #FF00009; *ie6, IE7, IE8 will display a red */
 *background-color: #0066FF; /*ie6, IE7 will become blue */  
 _ Background-color: #009933; /*ie6 becomes green */
}

</style>
</head>

<body>
<div id= "test" class= "Color" > Test box zss</div>
<div id= "Note"
 < Fervent style= "color: #009933" >ie6 the final green </strong>
 <strong style= "color: #0066FF" >IE7 final Blue </strong>
 <strong style= "color: #FF0000" >IE8 final red </strong>
 <strong style= " Color: #CC00FF ">firefox eventually becomes purple </strong>
    <div class=" Note "
     Today see hiccblogs inside a about IE8 compatibility, a sentence is very simple, unfortunately only for IE compatible, but also based on the IE7 core, the limitations are very large. Since I think CSS compatibility is relatively skilled, since out of the IE8, then the compatibility of the IE8 also study.
    </div>
 <div class= "Note" >css compatibility has always been a headache for everyone, IE6, IE7, and FF have been a problem for everyone, in previous articles, A lot of knowledge about this. IE8 the official version of the release, I want to find a way to distinguish the official version of IE8. In Baidu Search has many results, Google search results more. IE8 the official version and the beta version on the hack is very different. And the network methods are almost all reprint each other, the frequency of the highest number of the linxz.cn hack picture, but unfortunately this map of the method of the IE8 official version is invalid.
After analysis and summary, with the following proven solution, perhaps there will be a better and simpler hack, but for now this approach can solve the immediate problem. <br/>

</div>
 
   
 <div class=Note "
 <ul>
<li style=" List-style:none; " ><strong style= "color: #009933" >simple example:</strong></li>
<li> "9" Example: "margin:0px Auto9; </li>
<li> Here "9" can distinguish all IE and firefox.</li>
<li> "*" IE6, IE7 can be identified. IE8, Firefox can't. </li
<li> "_" IE6 can Identify "_", IE7, IE8, Firefox can not </li>
</ul>
  </div> 
   
</div>
</body>
</html>

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.