Web Standard: Two or one-column layout

Source: Internet
Author: User

Knowledge Points:

1. A fixed width of 2. A fixed width of 3. A column of adaptive width 4. A column of adaptive width is centered 5. A column of two up to block layout 1) a fixed width is defined as a height of 300px, Width 400px, color is #99ffcc style sheet. The display is as follows: 2) a fixed width of a column is centered in comparison with a fixed width of a column, as long as the center of the property is added, here is the CSS margin properties: margin. Add attribute Margin:auto; display as follows:3) A column of adaptive width adaptive width is relative to the browser, "width:400px;" is removed from the CSS, or "width:100%;" is used. You can see white edges on both sides, and this is the default margin for body. Here we can add a body{margin:0;}, you can remove the body's default margin. H1-h6,ul and other elements have a default margin of 4) a column of adaptive width centered as long as the outer margin of the set DIV is auto to achieve the center 5) a column two to block layout general Web site can be divided into three parts, head, middle body, bottom. We can use three div to divide. Similarly we can put three div on one line, just give width a fixed percentage, and add a "float:left" can CSS selector:  CSS syntax consists of three parts, selectors: Can be ID, class or P tags, attribute and value is to define a certain property of this object. ID and class selector:ID can only function with an object, cannot be applied to multiple objects, priority is higher than class, this is the difference between ID and class.

Web Standard: Two or one-column layout

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.