Difference between revisions of "Template:Columns-list/doc"
m (Small WP:EoS WP:COPYEDIT. WP:LINK: fix-cut WP:NOPIPE.) |
(No difference)
|
Revision as of 12:29, 28 July 2016
| 42px | Parts of this template (those related to documentation) need to be updated. Please update this template to reflect recent events or newly available information. (October 2015) |
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.
Contents
Use
{{columns-list|number of columns|
Text (usually a list)
}}
Alternatively, the width of each column may be specified using
{{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. This overrides the cols= setting.
This template uses CSS3 multiple column layout and is not supported by all Web browsers.
| 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></source>which would render as:
Here is another example:
<source lang=text></source>which would render as:
CSS styles can also be added after the number of columns. For example:
<source lang=text>which would render as:
If the number of columns is omitted, one column is used.
Redirects
- {{cmn}}
- {{collist}}
- {{col-list}}
- {{Columnslist}}
See also
Column-generating template families
| Caution | The templates listed here are not interchangeable. For example, using {{Multicol}} with {{col-end}} instead of {{Multicol-end}} would leave a HTML "div" (division) open, potentially harming any subsequent formatting. |
| 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}} |
| "Columns" | Table | No | {{Columns}} | – | – |
| "Multicol" | Table | Yes | {{Multicol}} | {{Multicol-break}} | {{Multicol-end}} |
| "Col-float" | CSS float | Yes | {{Col-float}} | {{Col-float-break}} | {{Col-float-end}} |
| "Columns-start" | CSS float | Yes | {{Columns-start}} | {{Column}} | {{Columns-end}} |
| "Div col" | CSS columns | Yes | {{Div col}} – {{Columns-list}} (wrapper) |
{{No col break}} | {{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.
References