how "CSS" resolves browser compatibility issues

Source: Internet
Author: User

how "CSS" resolves browser compatibility issues

Tools/Materials

Dreamweaver

Css

Method/Step

Different browsers have different definitions for the internal and external margin properties of HTML tags.

So if you want to eliminate this gap, you should add the following CSS code to the appropriate CSS section:

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

With this, the internal and external margins of all marks are unified.

  

  

Priority issues:

There are different priorities for the values given by the same tag property. The highest priority is the inline code, in fact, the CSS inside the page, followed by the browser default settings, and finally the external CSS restrictions.

  

Issues with margin inconsistencies:

When there are multiple images that need to be lined up, we usually use "float:left" to do so, so there is a compatibility problem with the browser. An issue that causes a margin inconsistency between the picture and the content behind it. One solution to this is to add "display:inline" to the image.

Div Center PROBLEM:

Usually we will use "vertical-align:middle" to achieve, which for Sogou browser, is normal, but for IE browser, but it has no effect. A good solution to this is to set the line height of the text to the same as the div to solve the problem.

  

  

internal and external border merge issues. Typically, for two related div blocks, the margin merge principle is used next to each other, resulting in only the maximum of two div blocks as a space between two div. The same rules apply to the spacing between the included two Div.

Having mastered this rule, we can do more handy when using div blocks for layout.

From the network

how "CSS" resolves browser 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.