Monday, July 4, 2011

CSS3 Multiple Columns

CSS3 Multiple Columns

With CSS3, you can create multiple columns for laying out text - like in newspapers!
In this chapter you will learn about the following multiple column properties:
  • column-count
  • column-gap
  • column-rule

Browser Support

Property Browser Support
column-count




column-gap




column-rule




Internet Explorer does not yet support the multiple columns properties.
Firefox requires the prefix -moz-.
Chrome and Safari require the prefix -webkit-.

CSS3 Create Multiple Columns

The column-count property specifies the number of columns an element should be divided into:
Opera Safari Chrome Firefox Internet Explorer

Example

Divide the text in a div element into three columns:
div
{
-moz-column-count:3; /* Firefox */
-webkit-column-count:3; /* Safari and Chrome */
column-count:3;
}

No comments:

Post a Comment