Block-level elements, inline elements, and positioning

Source: Internet
Author: User

Block-level element: a block, like a paragraph, occupies one row by default;

Inline element: it is also called an in-Row Element. As the name suggests, it can only be placed in a row, just like a word. It does not cause line breaks and can play an auxiliary role.

Because there are block-level elements, there will be float; floating elements will generate a block-level box, no matter what it is, and specify a width, otherwise it will be as narrow as possible; in addition, when the available floating space is smaller than the floating element, it will run to the next row until it has enough space to put it down.

 

Position: relative; relative positioning:

 

Block-level elements, inline elements, and positioning

Related Article

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.