Template:Columns-list

(Redirected from Template:Cmn)
Documentation icon Template documentation[view] [edit] [history] [purge]

This template is for use in a list in the body of an article, rather than in a navigation template like Template:Navbox. Based on Template:Reflist, but different in that the text to be displayed is manually created rather than a list of references.

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.

Template:CSS3 multiple column layout

Examples

Here is an example:

<source lang=text></source>

which would render as:

CSS styles can also be added in addition to the colwidth parameter. For example:

<source lang=text></source>

which would render as:

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.

Redirects

Tracking categories

See also

Column-generating template families

<section begin="table" />

Family Type
Handles wiki
 table code?
Start template Column divider End template
"Col" Table Yes {{Col-begin}},
{{Col-begin-fixed}} or
{{Col-begin-small}}
{{Col-break}} or
{{Col-2}} .. {{Col-5}}
{{Col-end}}
"Col-float" CSS float Yes {{Col-float}} {{Col-float-break}} {{Col-float-end}}
"Columns" Table No {{Columns}}
"Columns-list" CSS columns Yes {{Columns-list}} (wrapper)
"Columns-start" CSS float Yes {{Columns-start}} {{Column}} {{Columns-end}}
"Div col" CSS columns Yes {{Div col}} {{Div col end}}

I.e., can the columns handle the wiki markup {| | || |- |} used to create tables? If not, templates that produce these elements (such as {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}) and/or HTML tags (<table></table>, <tr></tr>, etc.) will need to be used instead.<section end="table" />