Permanently protected template

Template:Column-count

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

Usage

This template generates the equivalent of CSS3 style property column-count [1]

On Webkit browsers (Safari, Chrome, Chromium), it uses the experimental property -webkit-column-count.

On Mozilla browsers (Firefox), it uses the experimental property -moz-column-count.

Use it in CSS style properties to set the maximum number of columns to render the contents of a multi-column element.

When using this property to render unindented paragraphs of text, you should use also define a {{column-gap}}.

Avoid specifying a too large number of columns, as the resulting columns may be too narrow on narrow screens (in most cases 2 columns are enough for most display layouts, except if you know precisely that their contents will be narrow and mor columns can fit even on narrow screens such as smartphones). It is generally preferable in most cases to use {{column-width}} instead.

Example

  • {{column-count|2}} gives:
    -moz-column-count:2;-webkit-column-count:2;column-count:2;

References

  1. CSS Multi-column Layout Module, W3C specification.

See also