CSS · CSS Advanced · Lesson 55
CSS Multiple Columns
Newspaper-style text columns.
The CSS multi-column layout allows easy definition of multiple columns of text — just like in newspapers.
Example
<style>
.news { column-count: 3; column-gap: 40px; column-rule: 1px solid lightblue; font-family: Georgia; text-align: justify; }
.news h2 { column-span: all; }
</style>
<div class="news">
<h2>Lorem Ipsum Dolor Sit Amet</h2>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.
</div>
| Property | Use |
|---|---|
| column-count | Number of columns |
| column-gap | Gap between columns |
| column-rule | Line between columns |
| column-span | How many columns an element spans |
| column-width | Suggested optimal width |
Keep reading “CSS Multiple Columns”
Sign up to read the full lesson, try every example in the live editor, and take the 5-question quiz.