Template:Columns-list/doc: Difference between revisions
(Create) |
m (Added Bug and Solution sections) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 10: | Line 10: | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
Note: multiple columns currently render properly only in [[Mozilla Firefox]] and other [[Gecko (layout engine)|Gecko]]-based browsers<ref>{{cite web|accessdate=2006-11-24|date=[[2005-12-30]]|title=CSS3 Multi-Column Thriller|url=http://www.stuffandnonsense.co.uk/archives/css3_multi-column_thriller.html}}</ref> and [[Safari (web browser)|Safari 3]],<ref>{{cite web |url=http://www.css3.info/preview/multi-column-layout.html |title=Multi-column layout in Safari 3 and Firefox |accessdate=2007-07-25}}</ref> though the feature is included in [[Cascading Style Sheets|CSS3]] so it should work for a larger number of browsers in the future.<ref>{{cite web|url=http://www.w3.org/TR/css3-multicol/|title=CSS3 module: Multi-column layout|publisher=[[World Wide Web Consortium|W3C]]|date=[[2005-12-15]]|accessdate=2006-11-24}}</ref> [[Internet Explorer]] does not currently support the column selector and version 8 is not scheduled to support it.<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx#multicolumn |title=CSS Compatibility and Internet Explorer: Multi-column Layout |work=Microsoft Developer Network |publisher=Microsoft |accessdate=2009-02-04}}</ref> | Note: multiple columns currently render properly only in [[Mozilla Firefox]] and other [[Gecko (layout engine)|Gecko]]-based browsers<ref>{{cite web|accessdate=2006-11-24|date=[[2005-12-30]]|title=CSS3 Multi-Column Thriller|url=http://www.stuffandnonsense.co.uk/archives/css3_multi-column_thriller.html}}</ref> | ||
and [[Safari (web browser)|Safari 3]],<ref>{{cite web |url=http://www.css3.info/preview/multi-column-layout.html |title=Multi-column layout in Safari 3 and Firefox |accessdate=2007-07-25}}</ref> | |||
though the feature is included in [[Cascading Style Sheets|CSS3]] so it should work for a larger number of browsers in the future.<ref>{{cite web|url=http://www.w3.org/TR/css3-multicol/|title=CSS3 module: Multi-column layout|publisher=[[World Wide Web Consortium|W3C]]|date=[[2005-12-15]]|accessdate=2006-11-24}}</ref> | |||
[[Internet Explorer]] does not currently support the column selector and version 8 is not scheduled to support it.<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx#multicolumn |title=CSS Compatibility and Internet Explorer: Multi-column Layout |work=Microsoft Developer Network |publisher=Microsoft |accessdate=2009-02-04}}</ref> | |||
If the number of columns is omitted, two columns will be used. | If the number of columns is omitted, two columns will be used. | ||
Line 18: | Line 21: | ||
An example would be | An example would be | ||
<nowiki>{{columns-list|2| | |||
* [[George Washington]] | * [[George Washington]] | ||
* [[John Adams]] | * [[John Adams]] | ||
Line 65: | Line 68: | ||
* [[Fried Dragon Fish]] | * [[Fried Dragon Fish]] | ||
</div> | </div> | ||
==== Bug ==== | |||
'''Note''': if any of the bulleted list items includes a URL containing a query ("?") in the string the template will break and display only the value assigned to the column parameter. For example this wikitext: | |||
<pre> | |||
{{columns-list|2| | |||
*[https://media.digitalarkivet.no/ft/contents/65543?counties%5B0%5D=03&text= 1883] | |||
*[https://media.digitalarkivet.no/ft/contents/70811?counties%5B0%5D=03&text= 1899] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000042178 OBA/A-20057/Gba] | |||
*[https://media.digitalarkivet.no/ft/contents/69732?censuses%5B0%5D=15&text= 1901] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000042180 OBA/A-20057/Gbb] | |||
*[https://media.digitalarkivet.no/ft/contents/69733?counties%5B0%5D=03&text= 1902] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000042182 OBA/A-20057/Gbc] | |||
*[https://media.digitalarkivet.no/ft/contents/69734?counties%5B0%5D=03&text= 1903] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010465 OBA/A-20057/Gbd] | |||
*[https://media.digitalarkivet.no/ft/contents/65525?counties%5B0%5D=03&text= 1905] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010436 OBA/A-20057/Gbf] | |||
*[https://media.digitalarkivet.no/ft/contents/69736?counties%5B0%5D=03&text= 1907] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010435 OBA/A-20057/Gbg] | |||
*[https://media.digitalarkivet.no/ft/contents/113790?censuses%5B0%5D=15&text= 1908] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010434 OBA/A-20057/Gbh] | |||
*[https://media.digitalarkivet.no/ft/contents/113791?censuses%5B0%5D=15&text= 1909] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010432 OBA/A-20057/Gbi] | |||
*[https://media.digitalarkivet.no/ft/contents/113792?censuses%5B0%5D=15&text= 1910] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010433 OBA/A-20057/Gbj] | |||
}} | |||
</pre> | |||
displays as: | |||
<pre> | |||
2 | |||
</pre> | |||
==== Solution ==== | |||
To avoid this use the following code: | |||
<pre> | |||
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> | |||
* Item 1 | |||
* Item 2 | |||
* Item 3 | |||
* Item 4 | |||
* Item 5 | |||
* Item 6 | |||
</div> | |||
</pre> | |||
=== Redirects === | === Redirects === | ||
Line 75: | Line 110: | ||
* {{tl|Col-begin}} ({{tl|Col-start}}), {{tl|Col-begin-small}} {{lts/|Col-begin}} | * {{tl|Col-begin}} ({{tl|Col-start}}), {{tl|Col-begin-small}} {{lts/|Col-begin}} | ||
** {{tl|Col-break}} | ** {{tl|Col-break}} | ||
** | ** tl:Col-2 <small>(tl:Col-1-of-2, tl:Col-2-of-2)</small> | ||
** | ** tlCol-3 <small>(tl:Col-1-of-3, tl:Col-2-of-3, tl:Col-3-of-3)</small> | ||
** | ** tl:Col-4 <small>(tl:Col-1-of-4, tl:Col-2-of-4, tl:Col-3-of-4, tl|Col-4-of-4)</small> | ||
** | ** tl|Col-5 <small>(tl|Col-1-of-5, tl|Col-2-of-5, tl|Col-3-of-5, tl|Col-4-of-5, tl|Col-5-of-5)</small> | ||
** {{tl|Col-break}} | ** {{tl|Col-break}} | ||
* {{tl|Col-end}} | * {{tl|Col-end}} | ||
* {{tl|Top}}, {{tl|Mid}}, {{tl|Bottom}} | * {{tl|Top}}, {{tl|Mid}}, {{tl|Bottom}} | ||
* {{tl|Columns-start}}, {{tl|Column}}, {{tl|Columns-end}} {{lts/|Columns-start}} | * {{tl|Columns-start}}, {{tl|Column}}, {{tl|Columns-end}} {{lts/|Columns-start}} |
Latest revision as of 17:04, 2 December 2021
![]() |
This is a documentation subpage for Template:Columns-list (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
This template is intended to be used in a list in the article itself, 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.
Usage
{{columns-list|number of columns| text (usually a list) }}
Note: multiple columns currently render properly only in Mozilla Firefox and other Gecko-based browsers[1] and Safari 3,[2] though the feature is included in CSS3 so it should work for a larger number of browsers in the future.[3] Internet Explorer does not currently support the column selector and version 8 is not scheduled to support it.[4]
If the number of columns is omitted, two columns will be used.
Example
An example would be
{{columns-list|2| * [[George Washington]] * [[John Adams]] * [[Thomas Jefferson]] * [[James Madison]] * [[James Monroe]] }}
which would render as
CSS styles can also be added after the number of columns. For example
{{columns-list|2;width:400px;font-style:italic| * [[New York, I Love You]] * [[Hōtai Club]] * [[The Kon Ichikawa Story]] * [[Rainbow Song]] * [[Hana and Alice|Hana & Alice]] * [[All About Lily Chou-Chou]] * [[April Story]] * [[Swallowtail Butterfly (film)|Swallowtail Butterfly]] * [[Picnic (1996 film)|Picnic]] * [[Fried Dragon Fish]] }}
which would render as
Bug
Note: if any of the bulleted list items includes a URL containing a query ("?") in the string the template will break and display only the value assigned to the column parameter. For example this wikitext:
{{columns-list|2| *[https://media.digitalarkivet.no/ft/contents/65543?counties%5B0%5D=03&text= 1883] *[https://media.digitalarkivet.no/ft/contents/70811?counties%5B0%5D=03&text= 1899] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000042178 OBA/A-20057/Gba] *[https://media.digitalarkivet.no/ft/contents/69732?censuses%5B0%5D=15&text= 1901] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000042180 OBA/A-20057/Gbb] *[https://media.digitalarkivet.no/ft/contents/69733?counties%5B0%5D=03&text= 1902] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000042182 OBA/A-20057/Gbc] *[https://media.digitalarkivet.no/ft/contents/69734?counties%5B0%5D=03&text= 1903] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010465 OBA/A-20057/Gbd] *[https://media.digitalarkivet.no/ft/contents/65525?counties%5B0%5D=03&text= 1905] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010436 OBA/A-20057/Gbf] *[https://media.digitalarkivet.no/ft/contents/69736?counties%5B0%5D=03&text= 1907] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010435 OBA/A-20057/Gbg] *[https://media.digitalarkivet.no/ft/contents/113790?censuses%5B0%5D=15&text= 1908] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010434 OBA/A-20057/Gbh] *[https://media.digitalarkivet.no/ft/contents/113791?censuses%5B0%5D=15&text= 1909] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010432 OBA/A-20057/Gbi] *[https://media.digitalarkivet.no/ft/contents/113792?censuses%5B0%5D=15&text= 1910] - [https://www.arkivportalen.no/entity/no-OBA_arkiv000000010433 OBA/A-20057/Gbj] }}
displays as:
2
Solution
To avoid this use the following code:
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> * Item 1 * Item 2 * Item 3 * Item 4 * Item 5 * Item 6 </div>
Redirects
- {{cmn}} redirects here
See also
- {{div col}}
- {{columns}}
- Template:Columns-list
- {{Col-begin}} ({{Col-start}}), {{Col-begin-small}} Template:Col-begin <(edit talk links history)
- {{Col-end}}
- {{Top}}, {{Mid}}, {{Bottom}}
- {{Columns-start}}, {{Column}}, {{Columns-end}} Template:Columns-start <(edit talk links history)
- {{Multicol}}, {{Multicol-break}}, {{Multicol-end}} Template:Multicol <(edit talk links history)
- {{Div col}}, {{Div col end}} Template:Div col <(edit talk links history)
References
- ↑ "CSS3 Multi-Column Thriller". 2005-12-30. http://www.stuffandnonsense.co.uk/archives/css3_multi-column_thriller.html. Retrieved 2006-11-24.
- ↑ "Multi-column layout in Safari 3 and Firefox". http://www.css3.info/preview/multi-column-layout.html. Retrieved 2007-07-25.
- ↑ "CSS3 module: Multi-column layout". W3C. 2005-12-15. http://www.w3.org/TR/css3-multicol/. Retrieved 2006-11-24.
- ↑ "CSS Compatibility and Internet Explorer: Multi-column Layout". Microsoft Developer Network. Microsoft. http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx#multicolumn. Retrieved 2009-02-04.