It’s been three years now since Mozilla announced support for CSS column control and I am yet to see any sites using it. I am aware of course that until there is widespread support for CSS3 and that I shouldn’t expect to see much usage of column-count, column-width and column-gap, but no sites? Surely someone has had a play.
A demonstration of these nifty rules is in need methinks. The CSS used here is shown. Needless to say these examples don’t work in Internet Explorer, they do work in Firefox and Safari.
Two Column Examples
.twoColumnExample
{
/* For the Firefox users */
-moz-column-count: 2;
-moz-column-gap: 20px;
/* Safari's implementation */
-webkit-column-count: 2;
-webkit-column-gap: 20px;
/* to make it stand out from rest of the article */
padding: 2em;
border: 1px solid #ccc;
}
And the result:
Simple CSS beauty. But how about some more styling to see this in action.
.twoColumnExample
{
/* For the Firefox users */
-moz-column-count: 2;
-moz-column-gap: 20px;
/* Safari's implementation */
-webkit-column-count: 2;
-webkit-column-gap: 20px;
/* to make it stand out from rest of the article */
padding: 2em;
border: 1px solid #ccc;
}
.twoColumnExample2, .twoColumnExample2 *
{
line-height: 1.5em;
margin: 1.5em 0;
}
.twoColumnExample2:first-letter
{
font-size: 5.2em;
margin-top: 0.1em;
float: left;
padding-right: 0.1em;
color: #CC3333;
}
.twoColumnExample2:first-line
{
font-variant: small-caps;
letter-spacing: 0.1em;
}
Aenean velit
Mauris quis lorem. Donec diam sapien, malesuada eget, fringilla non, placerat interdum, ipsum. Sed ullamcorper neque vel sapien. Maecenas adipiscing enim sed nisl. Mauris vestibulum congue elit. Nunc faucibus.
The Future
I am looking forward to when the column CSS properties are widely supported. For a long time multiple column layouts have only been possible through the misuse of tables or through lines and lines of styling. I.e. the “Perfect 3 Column Liquid Layout“.
Of course this future is quite far away; IE8 Beta 1 was recently released which I suspect won’t render some of the CSS2 features correctly (or at all) and CSS3 support is still a long way off. Imagine that? The net being held back by rubbish Microsoft browsers. hmm…
Although it must be said that the print industry has had hundreds of years to get to where it is now, I really hope that Microsofts browsers don’t hold the web back that long.
