CSS Box Model

Source: Internet
Author: User

Border is margin, border is padding within, padding is width & height.

margin vertical margin Overlay, horizontal margin not superimposed. (top right bottom left, like round clock, starting from 0 o'clock in the evening )

width , the default value auto, expands the width of the element to its parent element.

Float:left or right;, Create a multi-column layout.

if a few adjacent elements are have a set width, are floating, and the horizontal space is enough to hold them, they will be lined up in Row,

If an element doesn't want to float,

Set the float:clear;

the parent element of the or floating element (if the parent element is different) Overflow:hidden; ( forcing the parent element the child element that contains its float)

The or also floats the parent element of the floating element ; (at this time the parent element cannot have space,width:100%; otherwise the following elements will squeeze up)

Or, set a point with no size, set to Float:clear;

CSS Box Model

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.