CSS compatibility issues

Source: Internet
Author: User

1. Due to the inconsistency of the two standards in the box model and the IE box model, there is a browser compatibility issue. We typically use standard box models (plus DOCTYPE declarations) to reduce compatibility issues.

2. For the effect of some of the default property settings on the page display, you can make the following uniform adjustments:

*{margin:0px; padding:0px;}

body{font:12px "Microsoft Jas Black", "Young Circle", "Song Body"; background: #f0f0f0; color: #666;}

ul,ol,li{List-style:none;}

div{margin:0px Auto; overflow:hidden;}

img{display:block; border:none;}

3. The following explanations are given in the IE6 browser for displaying the disorder:

    • Double margin: Floats and sets a floating margin, with the first element doubling the margin (workaround: display:inline;)

    • DIV floating Cascade: The first div floats, the next div will wrap around, but the IE6 will be close but there is a gap (workaround: Two div must be floating)

    • div Height Adaptive: height of auto,div does not automatically adapt to height as content increases (workaround: Overflow:hidden)

    • Hyperlink pseudo-Class: IE6 supports only linked pseudo-classes, such as a:hover (workaround: Use jquery to solve the problem)

    • Mouse display for hand type: IE6 if set cursor:hand; no hand cursor is displayed (workaround: cursor:pointer;)

    • Priority: If style conflicts require elevation of priority (workaround: Important)

4.png under IE6 can not be transparent situation: the use of JS solution, download online: Mypng.js added to the page can be resolved.

5.IE6 does not support fixed fix positioning situation: the use of JS to solve, if the use of JS Jitter can try to add or subtract a background attribute of HTML;

html{Background:url (1.jpg);}

(The picture does not necessarily exist)

6.css hack

such as IE6 to CSS properties before adding _ can let IE6 can be identified separately!

<!--[If LTE IE 6]>

<! [endif]-->

(see http://blog.csdn.net/freshlover/article/details/12132801 and http://www.kwstu.com/Admin/ViewArticle/201409011604277330)

CSS compatibility issues

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.