Template:Columns list

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:Columns list/doc" to edit its documentation if it is available. (How does this work?)

This template turns a list into a list with columns. It is a wrapper for {{div col}}, except it wraps the template by allowing for the content to be in the template rather than above and below.

Use

The width of each column may be specified using |colwidth= and a value in ems.

{{columns list|colwidth=width|
Text (usually a list)
}}

Here, width specifies the width of the columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays.

If |colwidth= is not specified, the default width of 30em will be used.

This template uses CSS3 multiple-column layout, which is not supported by all web browsers.

CSS3 multiple-column layout browser support      
Property Internet
Explorer
Firefox Safari Chrome Opera
column-width
column-count
≥ 10
(2012)
≥ 1.5
(2005)
≥ 3
(2007)
≥ 1
(2008)
≥ 11.1
(2011)
columns ≥ 10
(2012)
≥ 9
(2011)
≥ 3
(2007)
≥ 1
(2008)
≥ 11.1
(2011)
break-before
break-after
break-inside
≥ 10
(2012)
≥ 65
(2019)
≥ 10
(2016)
≥ 50
(2016)
≥ 37
(2016)

Examples

Here is an example:

{{columns list|colwidth=25em|
* [[George Washington]]
* [[John Adams]]
* [[Thomas Jefferson]]
* [[James Madison]]
* [[James Monroe]]
}}

which would render as:

HTML classes and CSS styles can also be added with the |class= and |style= parameters. For example:

{{columns list|colwidth=15em|style=width: 600px; font-style: italic;|
* [[All About Lily Chou-Chou]]
* [[April Story]]
* [[Hana and Alice|Hana & Alice]]
* [[Hōtai Club]]
* [[The Kon Ichikawa Story]]
* [[Love Letter (1995 film)|Love Letter]]
* [[New York, I Love You]]
* [[Picnic (1996 film)|Picnic]]
* [[Rainbow Song]]
* [[Swallowtail (film)|Swallowtail]]
}}

which would render as:

This template also works with numbered lists as its "text". For example:

{{columns list|colwidth=35em|
# [[George Washington]]
# [[John Adams]]
# [[Thomas Jefferson]]
# [[James Madison]]
# [[James Monroe]]
}}

The template, in fact, works with everything since all it does is wrap the text provided around a block to be divided into columns by CSS. Do not stop at wikitext lists – more advanced lists generated by the HTML templates will work too!

Error messages

Use of the no-longer-supported parameter |cols=, or use of the first unnamed parameter (aka |1=) along with |2= or a second unnamed parameter for the template's content, will generate a red error message. To fix this error, use |colwidth= instead of attempting to specify the number of columns.

The presence of an equals sign within the template's content can also cause display problems and red error messages. To fix this problem, add |1= in front of the template's content.

This template may cause pages to exceed the post-expand include size limit if used on large lists. If so, use {{div col}} and {{div col end}} instead.

Tracking category

See also

Column-generating template families

The templates listed here are not interchangeable. For example, using {{col-float}} with {{col-end}} instead of {{col-float-end}} would leave a <div>...</div> open, potentially harming any subsequent formatting.

  • "Responsive/mobile suited" refers to whether more than one column will show up in cell phones. See tests here. Some templates need to be updated to work in cell phones too. Please use mobile-suited templates, or straight divs. For why, see WP:Access. See discussion.
  • "Deprecated. Replace over time" is under discussion about whether templates without mobile capability should officially be called deprecated. In any case most uses of those templates can be replaced now by other templates or straight divs.
Column templates
Type Family
Deprecated.
Replace over time
Handles wiki
table code?[lower-alpha 2]
Responsive/
mobile suited
Dependent on
media queries
Can form
multiple columns
Visual Editor–
suited
Start
template
Column
divider
End
template
Float "col-float" Yes Yes Yes Yes ? ? {{col-float}} {{col-float-break}} {{col-float-end}}
"columns-start" Yes Yes Yes Yes ? ? {{columns-start}} {{column}} {{columns-end}}
Float "stack" See talk ? ? ? Yes No ? {{stack}} or
{{stack begin}}
? {{stack end}}
Columns "div col" Yes Yes Yes ? ? ? {{div col}} instead use {{no col break}} {{div col end}}
"columns list" Yes No Yes ? ? ? {{columns list}} (wraps div col) — —
Flexbox "flex columns" Yes No Yes ? ? ? {{flex columns}} — —
Flexbox "flexbox wrap" Yes Yes Yes No Yes[lower-alpha 3] ? {{flexbox wrap|start}} {{flexbox wrap|break}} {{flexbox wrap|end}}
Table "col" See talk Yes Yes No Yes ? ? {{col-begin}},
{{col-begin-fixed}} or
{{col-begin-small}}
{{col-break}} or
{{col-2}} .. {{col-5}}
{{col-end}}


Lua error in Module:Navbox_top_and_bottom at line 21: attempt to call field '_navbox' (a nil value).

Horizontal list
{{horizontal list|item1 |item2 }}
  • item1
  • item2
Horizontal list
{{flat list|
* item1
* item2}}
  • item1
  • item2
Horizontal list
{{comma-separated list|item1 |item2 }}
  • item1
  • item2
Bulleted list
{{bulleted list|item1 |item2 }}
  • item1
  • item2
Numeric ordered list
{{Ordered list|first |second }}
  1. first
  2. second
Alphabetic ordered list
{{Ordered list|list_style_type=lower-alpha |first |second }}
  1. first
  2. second
Unbulleted list
{{unbulleted list|item1 |item2 }}
  • item1
  • item2
Unbulleted list
{{plain list|
* item1
* item2}}
  • item1
  • item2
Glossary or definition list
{{glossary}}
{{term|first term}}
{{defn|first description}}
{{term|second term}}
{{defn|second description}}
{{glossary end}}
first term
first description
second term
second description
Bulleted list to flow around an image
[[File:Bad Title Example.png|left|thumb|100px]]

{{flowing list|
*item1
*item2}}

  • item1
  • item2
Ordered list in columns
{{columns list|colwidth=5em|
# first
# second}}
  1. first
  2. second

Lua error in Module:Navbox_top_and_bottom at line 21: attempt to call field '_navbox' (a nil value).

Turns a list into a list with columns. It is a wrapper for {{div col}}, except it wraps the template by allowing for the content to be in the template rather than above and below.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Content1

Specifies the content to divide into columns

Stringoptional
Columns / Column widthcolwidth

Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays.

Default
30
Example
20em
Stringoptional
CSS stylestyle

Specifies any custom styling.

Example
width: 600px; font-style: italic;
Stringoptional
HTML classclass

Specifies any class or multiple space-delimited classes.

Example
plainlist nowrap
Stringoptional


Cite error: <ref> tags exist for a group named "lower-alpha", but no corresponding <references group="lower-alpha"/> tag was found