CSS-border, margin, padding-Browser

Source: Internet
Author: User

 

In border, margin, and padding, when different browsers parse, the value of heigh is always different.

Border, after the W3C HTML 4.0.1 standard is used, it is not in the height, that is, Your Height = height. Otherwise, IE6, 7, and 8 contain Height = height-Up and down border, but FF does not.
Padding is not counted in height after W3C HTML 4.0.1 standard is used, that is, Your Height = height. Otherwise, in IE6, 7, and 8, heigh = height-Upper and Lower padding, but FF does not.
Margin, whether or not the W3C HTML 4.0.1 standard is used, is not included in the height, that is, Your Height = height. But in actual height measurement, the upper and lower margin values are subtracted. This is normal because it is margin.

 

Therefore, you must use doctype. Otherwise, it will be very troublesome to handle the differences between browsers. We recommend that you use an adaptive height.

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.