Template:Listing/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
{{ | {{Support|Template:Div Col}} | ||
This template is | This template is used to create a multiple column list. It automatically breaks the available screen space into equal parts, meaning, for instance, that it is not necessary to guess how many columns to use and then figure out the dividing point(s), e.g., the halfway point to divide the list into two columns, or the one-third and two-thirds points to divide the list into three columns. The default value for the column width is 30em, to change this value use {{para|colwidth|#}}. | ||
== | == Notice == | ||
This template uses [[Wikipedia:CSS|CSS]]3 multiple column layout and is not supported by all [[Wikipedia:WWW|Web]] [[Wikipedia:Web browser|browsers]]. | This template uses [[Wikipedia:CSS|CSS]]3 multiple column layout and is not supported by all [[Wikipedia:WWW|Web]] [[Wikipedia:Web browser|browsers]]. | ||
=== Examples === | === Examples === | ||
Here is an example: | Here is an example: | ||
<pre>{{Listing| | <pre> | ||
{{Listing| | |||
* Apple | * Apple | ||
* Pear | * Pear | ||
Line 28: | Line 28: | ||
}} | }} | ||
An example using | An example using {{para|colwidth}} | ||
<pre>{{Listing|colwidth= | <pre> | ||
{{Listing|colwidth=15| | |||
* Apple | * Apple | ||
* Pear | * Pear | ||
Line 39: | Line 40: | ||
which would render as: | which would render as: | ||
{{Listing|colwidth= | {{Listing|colwidth=15| | ||
* Apple | * Apple | ||
* Pear | * Pear | ||
Line 47: | Line 48: | ||
}} | }} | ||
<includeonly> | <includeonly>{{sandbox other||{{testcases other|| | ||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</includeonly> | [[Category:General Use Templates]] | ||
}}}}</includeonly> |
Revision as of 06:20, 15 June 2023
It contains usage information, categories and other content that is not part of the original template page.
|
Supporting Templates |
This template is used to create a multiple column list. It automatically breaks the available screen space into equal parts, meaning, for instance, that it is not necessary to guess how many columns to use and then figure out the dividing point(s), e.g., the halfway point to divide the list into two columns, or the one-third and two-thirds points to divide the list into three columns. The default value for the column width is 30em, to change this value use |colwidth=#
.
Notice
This template uses CSS3 multiple column layout and is not supported by all Web browsers.
Examples
Here is an example:
{{Listing| * Apple * Pear * Tomato * Green Bean * Corn }}
which would render as:
-
- Apple
- Pear
- Tomato
- Green Bean
- Corn
An example using |colwidth=
{{Listing|colwidth=15| * Apple * Pear * Tomato * Green Bean * Corn }}
which would render as:
-
- Apple
- Pear
- Tomato
- Green Bean
- Corn