CSS 3 Columns (equal height text columns)

Source: Internet
Author: User

CSS 3 can create equal-height text columns, implemented through Column-count, Column-width, and Column-gap properties . The assumptions are labeled as follows:

The following rule creates a three-column layout with a width of 14em for each column and a 2em gap between the columns. One of the advantages of CSS columns is that when the available space is less than the width of the defined column, the column does not wrap around as it does with floats, but instead reduces the number of columns, so if there is not enough space to display three columns, it is reduced to two columns.

{    -moz-column-count: 3;     -moz-column-width: 14em;     -moz-column-gap: 2em;     -moz-column-rule: 1px solid #ccc;     -webkit-column-count: 3;     -webkit-column-width: 14em;     -webkit-column-gap: 2em;     -webkit-column-rule: 1px solid #ccc;}

You can see that browser support for CSS columns is not extensive, so you need to use browser-specific extensions in addition to regular code.

CSS 3 Columns (equal height text columns)

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.