Microsoft officially recommends the ultimate CSS compatibility solution for IE7 IE8

Source: Internet
Author: User

Do you know the ultimate CSS compatibility solution for IE7 IE8 officially recommended by Microsoft? I 'd like to share with you here, all web page makers want their own web pages to be perfectly compatible with all mainstream browsers, including IE6, IE7, IE8, Firefox, opera, Safari, chrome, etc!

The ultimate CSS compatibility solution for IE7 IE8 -- officially recommended by Microsoft

All web page makers want their own web pages to be perfectly compatible with all mainstream browsers, including IE6, IE7, IE8, Firefox, opera, Safari, chrome, etc! However, our website creation must also meet China's national conditions. So I generally only consider IE6, IE7, and friefox browsers! These browsers all have their own dedicated csshack, so that we can do a good job of compatibility. IE8 has been updated to beta2, but the ie8hack method still cannot be found online! Now let's share this non-CSS ie8hack!

By default, IE8 uses its latest "standard mode" to display webpages. Therefore, when you use IE8 to browse webpages, you may encounter the following problems:

◆ The webpage layout is not neat

◆ Text or image overlapping

◆ JavaScript function problems or errors

The Internet Explorer 8 hack officially published by Microsoft adds a specific meta tag to the header of the webpage, and forces Internet Explorer 8 to display the webpage like Internet Explorer 7.

    1. <Metahttp-equivMetahttp-equiv= "X-UA-compatible"Content="IE=Emulateie7"/> 

The following example shows how to mark the IE7 compatibility mode based on each page:

Below isCodeFragment:

  1. <Html> 
  2. <Head> 
  3. <! -- Useie7mode --> 
  4. <Metahttp-equivMetahttp-equiv= "X-UA-compatible"Content="IE=Emulateie7"/> 
  5. <Title>Mywebpage</Title> 
  6. </Head> 
  7. <Body> 
  8. <P>Contentgoeshere.</P> 
  9. </Body> 
  10. </Html> 
  11. /* Cssstyle */only recognized by IE8
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.