In-depth understanding of the Box Model (2)

Source: Internet
Author: User
    • in the previous section, we talked about the box model. Now we will introduce some elements related to the box model. first, declare the details that are common errors. for specific attributes of an element, see the CSS style sheet by yourself. thank you
      1. border (Border)
      border is generally used to split different elements. Therefore, border needs to be included when the width and height of the calculated elements are high. Therefore, when calculating the precise layout, the Influence of border must be taken into account. In the past, I did not consider border. After I used to coordinate the two
      , I had to limit the total width, when allocating each
      , the Border width is not taken into account, so that the two divs are not tied.
      experience: in hexadecimal format like "#336699", the abbreviation can be "#369"
      2. set different attribute values for different borders
      method:
      if one attribute value is given, it indicates the attribute settings for all borders.
      If two attribute values are given, the former indicates the upper and lower border attributes, and the latter indicates the Left and Right Border attributes

If three attribute values are given, the former indicates the attribute of the upper border, the middle indicates the attribute of the left and right border, and the latter indicates the attribute of the lower border.
If four attribute values are given, they represent the top, right, bottom, and left border attributes in sequence, that is, clockwise sorting.
Note: When multiple rules apply to the same border, a conflict occurs. The subsequent settings overwrite the previous one. When you set the background-color background color for the element, content + padding is used in IE, while content + padding + border is used in Firefox. Remember this!

To be continued ........

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.