Compatibility between IE and Firefox 2

Source: Internet
Author: User
Small set of XHTML + CSS compatibility solutions! I will first write down some of the problems I encountered below: 1. The box models in Mozilla Firefox and IE are inconsistent, resulting in a 2px difference solution: div {margin: 30px! Important; margin: 28px;} note that the order of the two margin cannot be reversed! The important attribute ie cannot be identified, but other browsers can. Therefore, in IE, it is actually interpreted as follows: If Div {maring: 30px; margin: 28px} is repeatedly defined, it is executed according to the last one. Therefore, you cannot write only margin: xxpx! Important; web teaching network 2. the box interpretations of ie5 and IE6 are inconsistent. Div {width: 300px; margin: 0 10px 0 10px;} Div width is interpreted as 300px-10px (right filling) -10px (left filled) the final Div width is 280px, while the width on IE6 and other browsers is 300px + 10px (right filled) + 10px (left filled) = 320px. Modify Div {width: 300px as follows! Important; width/**/: 340px; margin: 0 10px 0 10px} 3. UL labels have padding values by default in Mozilla, and only margin has a value in IE. Therefore, UL {margin: 0; padding: 0;} is defined first ;} to solve most of the problems 4. the script does not support the language attribute in xhtml1.1. You only need to change the code

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.