Template:Columns-list/doc: Difference between revisions
Create: Minecraft Mod Wiki>Joker876 Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AT THE END OF THIS PAGE --> This template is for use in a list in the body of an article, rather than in a navigation tem..." |
Create: Minecraft Mod Wiki>Neptune9095 →Examples: Page using deprecated source tags |
||
Line 17: | Line 17: | ||
=== Examples === | === Examples === | ||
Here is an example: | Here is an example: | ||
< | <pre>{{columns-list|colwidth=20em| | ||
* Bat | * Bat | ||
* Cow | * Cow | ||
Line 32: | Line 32: | ||
* Turtle | * Turtle | ||
* Wolf | * Wolf | ||
}}</ | }}</pre> | ||
which would render as: | which would render as: | ||
Line 54: | Line 54: | ||
CSS styles can also be added in addition to the colwidth parameter. For example: | CSS styles can also be added in addition to the colwidth parameter. For example: | ||
< | <pre>{{columns-list|colwidth=15em|style=width: 600px; font-style: italic;| | ||
* All About Lily Chou-Chou | * All About Lily Chou-Chou | ||
* April Story | * April Story | ||
Line 65: | Line 65: | ||
* Rainbow Song | * Rainbow Song | ||
* Swallowtail | * Swallowtail | ||
}}</ | }}</pre> | ||
which would render as: | which would render as: |
Revision as of 07:34, 15 October 2023
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.
Use
The 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 20em will be used.
This template uses CSS3 multiple-column layout, which is not supported by all web browsers.
Examples
Here is an example:
{{columns-list|colwidth=20em| * Bat * Cow * Dolphin * Fish * Horse * Llama * Parrot * Pig * Polar bear * Rabbit * Sheep * Squid * Turtle * Wolf }}
which would render as:
- Bat
- Cow
- Dolphin
- Fish
- Horse
- Llama
- Parrot
- Pig
- Polar bear
- Rabbit
- Sheep
- Squid
- Turtle
- Wolf
CSS styles can also be added in addition to the colwidth parameter. For example:
{{columns-list|colwidth=15em|style=width: 600px; font-style: italic;| * All About Lily Chou-Chou * April Story * Hana and Alice * Hōtai Club * The Kon Ichikawa Story * Love Letter (1995 film) * New York, I Love You * Picnic (1996 film) * Rainbow Song * Swallowtail }}
which would render as:
- All About Lily Chou-Chou
- April Story
- Hana and Alice
- Hōtai Club
- The Kon Ichikawa Story
- Love Letter (1995 film)
- New York, I Love You
- Picnic (1996 film)
- Rainbow Song
- Swallowtail