Creating a newspaper or magazine-style layout, in which text flows between multiple columns, has not been seriously approached in web design until very recently. Currently, the technique remains a draft proposal for CSS3.
Continuous multiple-column text design for the web is also somewhat controversial: there is an argument to be made that users have been habituated into reading most web sites like a book, from one edge of the page to the other, and that forcing text into a magazine-style layout is actually a step backwards. However, with a little bit of cleverness, we can actually have the best of both worlds.
First, the text to be divided into columns must be in a single container - most likely, but not exclusively, a div:
- <div id=columns">
- <p>Hey, did you know that the modern necktie originates
- in the cravats worn by Croatian mercenaries during the Thirty
- Years War almost four hundred years ago? From that kick-ass origin,
- ties have become the sartorial choice of dandies, fops, and
- Organization Men of all stripes. Boring!</p>
- <p>While we don’t make ties that are capable of staunching
- aortal bleeding from a musket ball wound, our extra-skinny,
- super-strong ties could be used as a garrotte – or a tourniquet,
- if you wished.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Etiam erat tellus, fringilla non luctus in, volutpat a tellus.
- Etiam convallis nunc et tellus volutpat vestibulum. Praesent justo
- massa, porta id porttitor ut, adipiscing in nulla. Mauris vitae felis
- lectus, nec elementum dolor. Donec ligula metus, blandit nec placerat
- at, placerat et erat. Praesent non erat quis magna accumsan egestas
- sed nec elit. Ut nec nibh nisi, et pretium eros. Etiam tincidunt
- rutrum justo, at suscipit quam posuere vel. Suspendisse ac neque
- non dolor rutrum fringilla. Nullam varius venenatis lacus sit amet
- porttitor. Cras porttitor sapien at ante commodo sodales. Nunc risus
- eros, tincidunt sed varius vel, sodales ac mauris. Quisque sapien erat,
- lacinia a tincidunt quis, faucibus sit amet diam. Quisque condimentum,
- nunc ac tincidunt tempor, risus est tincidunt diam, vel tempor felis
- eros in dui. In sed nibh sapien, non eleifend sem.</p>
- </div>
Second, our CSS divides this div up into a series of columns. Being a draft CSS3 proposal, each browser implements its own proprietary interpretation of the property:
- div#columns {
- -webkit-column-count: 2; -webkit-column-gap: 2em;
- -webkit-column-rule: 5px solid black;
- -moz-column-count: 2; -moz-column-gap: 2em;
- -moz-column-rule: 5px solid black;
- }
This declaration divides the div into two equal width columns for Firefox, Safari and Chrome, automatically balancing the text between both columns, separating them by 2em and placing a black rule five pixels wide in the middle. It is a fluid design: the height of the columns changes as text is added or removed, or if the overall width of the container changes, but there are always two columns.
This layout also gracefully degrades rather neatly: if a browser does not understand CSS3, the text is simply displayed normally in the container div.
A solution with greater fluidity is to set column-width rather than column-count, allowing the browser to determine just how many columns there should be, based on the width of the container:
- div#columns {
- -webkit-column-width: 15em; -webkit-column-gap: 2em;
- -webkit-column-rule: 5px solid black;
- -moz-column-width: 15em; -moz-column-gap: 2em;
- -moz-column-rule: 5px solid black;
- }
Now the number of columns created is determined by the overall width of our wrapper div – so long the div can be wholly divided with columns that are 15em wide with appropriate gaps and rules, the browser will add columns. If the div is less than 34em wide ((2 × 15em) + 4em for the gap) the text will fall into a single column.
Newspaper-style columnar layout on web pages remains controversial, cutting-edge, and out of the reach of Internet Explorer (at least as the Microsoft browser exists in early 2010). On the other hand, it does gracefully degrade. Going forward, columnar text layout will likely become a strong visual component in web pages, if used carefully and appropriately.
Haha, that is actually incredibly clever.
![Prometheus: Collector's Edition (Bilingual) [Blu-ray 3D + Blu-ray + DVD + Digital Copy] Prometheus: Collector's Edition (Bilingual) [Blu-ray 3D + Blu-ray + DVD + Digital Copy]](http://ecx.images-amazon.com/images/I/5192I1rtYnL._SL160_.jpg)

