Šablóna:Columns-list/doc
Chyba skriptu: Zadaný modul „Message box“ neexistuje.
Chyba skriptu: Zadaný modul „Hatnote“ neexistuje.
Template:Columns-list turns a list into a list with columns. It is a wrapper for {{div col}}, except it wraps the template by allowing for the content to be in the template rather than above and below.
Use
The width of each column may be specified using |colwidth=
\n\n\n\n\n\n"
}
</templatedata></noinclude> 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=
\n\n\n\n\n\n"
}
</templatedata></noinclude> 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.
Šablóna:CSS3 multiple column layout
Examples
Here is an example:
{{columns-list|colwidth=35em|
* [[George Washington]]
* [[John Adams]]
* [[Thomas Jefferson]]
* [[James Madison]]
* [[James Monroe]]
}}
which would render as:
HTML classes and CSS styles can also be added with the |class=
\n\n\n\n\n\n"
}
</templatedata></noinclude> and |style=
\n\n\n\n\n\n"
}
</templatedata></noinclude> parameters. For example:
{{columns-list|colwidth=15em|style=width: 600px; font-style: italic;|
* [[All About Lily Chou-Chou]]
* [[April Story]]
* [[Hana and Alice|Hana & Alice]]
* [[Hōtai Club]]
* [[The Kon Ichikawa Story]]
* [[Love Letter (1995 film)|Love Letter]]
* [[New York, I Love You]]
* [[Picnic (1996 film)|Picnic]]
* [[Rainbow Song]]
* [[Swallowtail (film)|Swallowtail]]
}}
which would render as:
This template also works with numbered lists as its "text". For example:
{{columns-list|colwidth=35em|
# [[George Washington]]
# [[John Adams]]
# [[Thomas Jefferson]]
# [[James Madison]]
# [[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Šablóna:Sndmore advanced lists generated by the HTML templates will work too!
Error messages
Use of the no-longer-supported parameter |cols=
\n\n\n\n\n\n"
}
</templatedata></noinclude>, or use of the first unnamed parameter (aka |1=
\n\n\n\n\n\n"
}
</templatedata></noinclude>) along with |2=
\n\n\n\n\n\n"
}
</templatedata></noinclude> or a second unnamed parameter for the template's content, will generate a red error message. To fix this error, use |colwidth=
\n\n\n\n\n\n"
}
</templatedata></noinclude> 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=
\n\n\n\n\n\n"
}
</templatedata></noinclude> in front of the template's content.
Redirects
- {{cmn}}
- {{collist}}
- {{col-list}}
- {{Columnslist}}
Tracking category
- Šablóna:Clc (for pages in article space only)
See also
Šablóna:Column-generating template families Šablóna:HTML lists