Template:Columns-list/doc: Difference between revisions

From ScoutWiki, For Everyone, Everywhere involved with Scouting and Guiding...
Jump to navigation Jump to search
m (note Lua module used, add template category)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 15:00, 18 March 2019

Script error: No such module "Hatnote".

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.

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)
No No No ≥ 11.1
(2011)

Examples

Here is an example:

<source lang=text>

Script error: No such module "Check for unknown parameters".Script error: No such module "Check for unknown parameters".</source>

which would render as:

Script error: No such module "Check for unknown parameters".Script error: No such module "Check for unknown parameters".

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

<source lang=text>

Script error: No such module "Check for unknown parameters".Script error: No such module "Check for unknown parameters".</source>

which would render as:

Script error: No such module "Check for unknown parameters".Script error: No such module "Check for unknown parameters".

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 category

See also

Column-generating template families

<section begin="table" />

Family Type
Handles wiki
 table code?File:Dagger-14-plain.png
Start template Column divider End template
"Col" Table Yes {{Col-begin}} or
{{Col-begin-small}}
{{Col-break}}
{{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}}

File:Dagger-14-plain.png 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" />