:Help:Columns

{{Wikipedia how-to|H:COL}}

{{Short description|How to create columns in an article}}

colbegin and colend

To create columns in an article one may use {{tl|colbegin}} and {{tl|colend}}. Note that this is not supported by Internet Explorer version 9 and below or Opera version 11 and below — see {{tl|Div col}} for details. To illustrate the use of these templates, this example uses the {{tl|lorem}} template to generate Lorem ipsum placeholder text.

{{colbegin}}

{{lorem}}

{{lorem}}

{{colend}}

produces:

{{colbegin}}

{{lorem}}

{{lorem}}

{{colend}}

You can also use {{tl|col-begin}}, {{tl|col-break}}, and {{tl|col-end}}. But don't use this variety to set numbered or bulleted lists in columns, because {{tl|col-break}} breaks the list up, which is a problem for accessibility.

As such:

{{col-begin}}

{{col-break}}

{{lorem}}

{{col-break}}

{{lorem}}

{{col-break}}

{{lorem}}

{{col-end}}

creates

{{col-begin}}

{{col-break}}

{{lorem}}

{{col-break}}

{{lorem}}

{{col-break}}

{{lorem}}

{{col-end}}

CSS

MediaWiki:Common.css defines the following styles:

  • "div.columns-2", "div.columns-3", "div.columns-4" and "div.columns-5" which need to contain a "div.column"

Templates

  • {{tl|colbegin}} and {{tl|divbegin}} – utilizes CSS3 features
  • {{tl|Columns-start}} – defines CSS classes (see above)
  • {{tl|col-begin}} – uses an HTML table (also adds a MULTICOL attribute)
  • {{tl|col-begin-small}}
  • {{tl|div col}} – uses CSS3
  • {{tl|columns-list}} – uses CSS3

CSS3 multicolumn support

{{Further|Template:Reflist#Browser support for columns}}

{{CSS3 multiple column layout}}

The templates {{tl|div col}} and {{tl|divbegin}} use a feature in CSS3 that is implemented in:

See also

{{Help navigation}}

{{Wikipedia technical help|collapsed}}

Columns