CSS Basic Layout 16 Cases

Source: Internet
Author: User
CSS single row
Single row 1: Float float in upper left corner, fixed width.
Single row 2: Fixed in the upper left corner, fixed width, using absolute (absolute) positioning.
Single row 3: Fixed in the upper left corner, not fixed width, with percent (%) defined width from the Fit page.
Single row 4 (recommended): Fixed width, using the body style to define the center attribute (text-align:center;) to achieve the automatic center of the page.
Single row two columns
Single row two column 1: Both columns are fixed width. The first column floats in the upper-left corner and the second column floats to the right of the first column.
Single row two column 2: Both columns are percent width, but the screen is not. The first column is fixed in the upper-left corner and the second column floats to the right of the first column.
Single row two column 3: Both columns are in percent width, full screen. Both columns use absolute positioning.
Single row two column 4: Both columns are in percent width, full screen. The first column floats in the upper-left corner and the second column floats in the upper-right corner.
Single row two column 5: Both columns are in percent width, full screen. The first column floats in the upper-left corner and the second column floats to the right of the first column.
Single row three columns
Single-row three-column 1: All left and right columns are absolutely positioned (the right-hand column is positioned on the right). Left column and right column fixed width, middle column adaptive page.
Single row three column 2: left column positioned on top left, right column positioned on right, middle column floating in left column. Left column and right column fixed width, middle column adaptive page.
Single row three column 3: All three columns are absolutely positioned. The left column and right columns are fixed widths, and the middle columns are adaptively adapted to the content.
Row three column 4 (recommended): Similar to style 2, just add the margin:20px attribute to the body style, solving the problem of the middle column in the Netscape6.0.
Row three column 5: Left and right column absolute positioning, the middle column adaptive. Width Full screen.
Top row three columns
Top row three column 1 (recommended): Top row Adaptive page width. The left and right columns are absolutely positioned, and the middle columns are adaptive pages.
Top row Three column 2: Width full screen



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.