Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

CSS Columns

Text breaking option is not the most popular text option ever since magazine layout. Just like in printing design, there are Columns in web design too. The best and clearest way to use it is column option in CSS.

It is boring, content and design-wise, for text content to be extended over the full web page, so this is rare to see. Please note that the blog content is left out of this because of its nature.

So, textual content on the web is organized in smaller Width elements and because of that, there’s no need for columns. After all those facts listed, I needed columns last week on a design I’ve worked on, and it was fully justified (but left aligned).

Properties linked to the columns property are:

  • column-count - specifies the number of columns an element should be divided into,
  • column-width - specifies the width of the columns,
  • column-gap - specifies the gap between the columns,
  • column-rule - sets the rule between the columns (it is a shorthand property for setting rule width, rule color and rule style),
  • column-span - specifies how many columns an element should span across.
    Internet Explorer 9 (and earlier versions) and Firefox do not support column-span
  • column-fill - specifies how to fill columns (auto or balance).

The columns property alone will accept column-count, column-width, or both properties.

Let me explain these properties a little bit.

The column-width property Specifies a suggested, optimal width for the columns. If the column-count is defined, the column-width value will be overridden.

The column-fill property is only available in Firefox. Content with column-fill balance will automatically balance content in a height-constrained multi-column layout. Other browsers will always fill columns sequentially when given a height constraint.If you want the same behavior through all browsers just set column-fill: auto.

Content that can be edited this way must be into one of the next element


, ,
    . If the height of the columns isn’t defined, the content divided into columns defines height.


    This example represents breaking content into 2 column.


    This example represents breaking content into defined width column with a defined gap between them.


    This example represents content staggered into 3 columns with defined rule between them.


    The last example represents content into columns and element which include all columns width.


    I believe this is everything there is about column property in CSS. Hope it helps!

    If you want to read more about CSS and web design, check this blog hourly for it, or just subscribe

This post first appeared on 13 Remote Development Myths, please read the originial post: here

Subscribe to 13 Remote Development Myths

Get updates delivered right to your inbox!

Thank you for your subscription