(16/06/10) DIV+CSS Web page Standardization layout div+css compatibility issues Summary.

Source: Internet
Author: User

1. Compatibility issue: The developer of the individual browser does not design some CSS properties according to the standard.

A good site layout requires the same interface to be present on all browsers, even if it is not exactly consistent. Browser for page layout debugging will be divided into IE and non-ie two kinds. The main reason is that Microsoft's IE browser is not designed according to the standards of the web, and not IE is almost compliant. At present, IE browser occupies a large market share, IE5 use few people, the basic need not to consider, general IE browser compatibility only for IE6,IE7,IE8 on it, IE's new version to standardize the forward. Non-IE browser is represented by Firefox browser.

2. Different browsers explain the difference between box models

a.ie Box Model:

The scope of the IE box model includes the margin border padding content area, and the content of the IE box model contains border padding

B. Standard Box Model:

The scope of the standard box model includes the margin border padding content area, and the contents of the standard box model do not contain border padding

3. Compatibility problem Resolution: Set browser to follow the standard

If you add the DOCTYPE statement, then all browsers will use the standard box model to explain your box, and the Web page will appear consistent across browsers. The declaration code is as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

(16/06/10) DIV+CSS Web page Standardization layout div+css compatibility issues Summary.

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.