Block property labels and inline attribute labels and style precedence

Source: Internet
Author: User
One, block attribute tag

1, the default is full line;

2, height, row height and top and bottom margin can be controlled;

3, the width default is 100% of the container it is in, unless you set a width.

Two, inline attribute tags

1, the label element followed by the default tag followed by the same attribute;

2, does not support wide height;

3, only horizontal margin and padding are supported;

4, The Wrap between notes and the space is parsed;

Note: In the case of nesting, inline attribute tags can be nested within the block attribute tag, but the inline attribute tag cannot be arbitrarily nested within the block attribute tag.

Third, about Inline-block

1, let the inline attribute tag support wide height;
2, let the block attribute label display on one line;
3, line break is parsed;
4, content open width;

Note: IE6,IE7 does not support Inline-block;

Note: The block attribute label in the bread picture, the following will have a gap of 3px; solution: Solve with display:block or vertical-align:middle;

Four, Style priority

Inline Style > ID > class > Type Selector

Block property labels and inline attribute labels and style precedence

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.