Teamplaid:Columns-list
{{Documentation|content=
Uses Lua: |
This template is for use in a list in the body of an article, rather than in a navigation template like Teamplaid:Navbox. Based on Teamplaid:Reflist, but different in that the text to be displayed is manually created rather than a list of references.
Ùsaid - Usage
deasaichThe 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.
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) |
≥ 65 (2016) |
≥ 15 (2013) |
Eisimpleirean - Examples
deasaichHere is an example:
{{Columns-list|colwidth=35em|
* {{enUici|George Washington}}
* {{enUici|John Adams}}
* {{enUici|Thomas Jefferson}}
* {{enUici|James Madison}}
* {{enUici|James Monroe}}
}}
which would render as:
CSS styles can also be added with the |style=
parameter. For example:
{{Columns-list|colwidth=15em|style=width: 600px; font-style: italic;|
* {{enUici|All About Lily Chou-Chou}}
* {{enUici|April Story}}
* {{enUici|Hana and Alice|Hana & Alice}}
* {{enUici|Hōtai Club}}
* {{enUici|The Kon Ichikawa Story}}
* {{enUici|Love Letter (1995 film)|Love Letter}}
* {{enUici|New York, I Love You}}
* {{enUici|Picnic (1996 film)|Picnic}}
* {{enUici|Rainbow Song}}
* {{enUici|Swallowtail (film)|Swallowtail}}
}}
which would render as:
This template also works with numbered lists as its "text". For example:
{{Columns-list|colwidth=35em|
# {{enUici|George Washington}}
# {{enUici|John Adams}}
# {{enUici|Thomas Jefferson}}
# {{enUici|James Madison}}
# {{enUici|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
deasaichUse 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.
Roinn-seòrsa tracaidh - Tracking category
deasaich- Roinn-seòrsa:Pages using Columns-list with unknown parameters (0) (for pages in article space only)
See also
deasaichColumn-generating template families
deasaichThe templates listed here are not interchangeable. For example, using {{Col-float}} with {{Col-end}} instead of {{Col-float-end}} would leave a HTML "div" (division) open, potentially harming any subsequent formatting. |
Family | Type | Handles wiki
table code? |
Responsive/ Mobile suited |
Start template | Column divider | End template |
---|---|---|---|---|---|---|
"Col" | Table | Yes | No | {{Col-begin}}, {{Col-begin-fixed}} or {{Col-begin-small}} |
{{Col-break}} or {{Col-2}} .. {{Col-5}} |
{{Col-end}} |
"Col-float" | CSS float | Yes | Yes | {{Col-float}} | {{Col-float-break}} | {{Col-float-end}} |
"Columns" | Table | No | No | {{Columns}} | – | – |
"Columns-list" | CSS columns | Yes | Yes | {{Columns-list}} (wrapper) | – | – |
"Columns-start" | CSS float | Yes | Yes | {{Columns-start}} | {{Column}} | {{Columns-end}} |
"Flex columns" | CSS flexbox | Yes | Yes | {{Flex columns}} | – | – |
"Div Col" | CSS columns | Yes | 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 {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}) or HTML tags (<table>...</table>
, <tr>...</tr>
, etc.) will need to be used instead.