Margin negative worth understanding

Source: Internet
Author: User

There are two types of guides in the margin attribute, the top and left guides belong to one class, and the guides for right and bottom belong to another category. Top and left are other elements for reference, and right and bottom are referenced by the elements themselves.

and the margin negative on the left causes the element to move up and to the left.

A negative margin below and to the right causes the element below and to the right of the element to be pulled toward the element.

The margin property can be applied to almost all elements except the table display type (excluding table-caption, table and inline-table) elements, and the vertical margin pairs non-displaced inline elements (non-replaced inline Element) does not work.

Box's actual size = Box's physical size + positive margin

Margin negative worth understanding

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.