Free CSS Multi-Column Generator

Create newspaper-style multi-column text layouts with live preview. Adjust columns, gap, rule style and width.

Preview
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
CSS Code

    

What CSS Multi-Column Layout Is

CSS Multi-column Layout (the W3C "CSS Multi-column Layout Module Level 1" specification) reflows the content of a single element across two or more columns automatically, the same way newspaper and magazine printing has handled long-form text for centuries. You declare how many columns you want (or how wide each column should be), and the browser distributes the content top-to-bottom, left-to-right, balancing line counts so each column ends at roughly the same height. The module became a W3C Candidate Recommendation in April 2011 and shipped in usable form across browsers between Firefox 3.5 (June 2009) and IE 10 (October 2012). It's been a baseline web platform feature for over a decade. Unlike Flexbox or Grid (which align discrete child elements into known positions) multi-column layout treats the content as a single continuous flow that the browser slices into columns based on the available height.

When CSS Columns Are the Right Tool

column-count vs column-width, The Most Important Distinction

Two ways to specify columns, and the choice matters for responsive design. column-count: 3 hard-codes three columns, at any viewport width, the browser produces exactly three columns, getting narrower as the container narrows. On a phone, three columns become unreadable thin slivers. column-width: 250px instead asks for columns "at least 250 pixels wide"; the browser calculates how many fit in the container and reflows automatically as the viewport changes. Wide screens get many columns, narrow screens get few or one, without a single media query. The combination pattern is the modern best practice: columns: 250px 4 (shorthand for column-width plus column-count) means "columns 250px wide, but never more than 4." The browser produces 4 columns on a wide desktop, fewer on a tablet, one on a phone, automatically responsive. Most production CSS uses this combination form for the resilience benefit.

Controlling Where Content Breaks

By default the browser breaks columns wherever it lands, which sometimes splits a heading from its first paragraph, or breaks a card in half. The break-inside: avoid CSS property (CSS Fragmentation Module Level 3) tells the browser "don't split this element across columns", typically applied to cards, figures, and any content that should stay together. break-before: column forces a column break before an element, useful for "start each section in a new column." column-span: all makes a heading or callout span the full width across all columns, breaking out of the column flow, typical for the article title above a multi-column body.

Pitfalls to Watch For

Multi-column layout has subtle interactions worth knowing. Reading order on screen readers follows DOM order, which is generally the same as the visual top-to-bottom column order, but assistive technology can occasionally get confused on complex layouts. Print pagination with multi-column can produce odd column-balancing across page breaks; test with print stylesheets if you care about printed output. Long content fills downward: if you give a multi-column container a fixed height shorter than the content needs, content overflows; if you don't constrain height, the browser balances columns to roughly equal length. Anchored content (forms, interactive elements that need to stay in one place) works poorly in columns because the user can't tell where to look. Mixing with Grid or Flexbox at the same level produces unpredictable results, pick one layout method per container.

The CSS Properties Generated

Related Tools

CSS Grid Generator CSS Box Model Flexbox Generator CSS Clip Path