Template:Columns-list/doc

Revision as of 06:21, 13 August 2025 by ConsciousCode (talk | contribs) (Importing from Wikipedia:Template:Columns-list/doc)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Script error: No such module "High-use".

Template:Columns-list 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 edit

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.

Template:CSS3 multiple column layout

Examples edit

Here is an example:

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

which would render as:

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

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

which would render as:

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

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

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 listsTemplate:Sndmore advanced lists generated by the HTML templates will work too!

Error messages edit

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.

Redirects edit

Tracking category edit

See also edit

Template:Column-generating template families Template:HTML lists


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

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