Template:Columns: Difference between revisions
mNo edit summary |
|||
| Line 8: | Line 8: | ||
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable" | {| style="width: 100%; text-align: left; margin: auto;" class="wikitable" | ||
|- | |- | ||
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Example: | ! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Example: Default Usage</span><br><span style="font-weight: normal;">When used with no additional parameters, the template will return a 3 column list.</span> | ||
|- | |- | ||
! width=25%|You Type | ! width=25%|You Type | ||
| Line 36: | Line 36: | ||
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable" | {| style="width: 100%; text-align: left; margin: auto;" class="wikitable" | ||
|- | |- | ||
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Example: | ! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Example: Count Parameter</span><br><span style="font-weight: normal;">You can specify the number of columns in the output through use of the <code>|count=</code> parameter.</span> | ||
|- | |- | ||
! width=25%|You Type | ! width=25%|You Type | ||
| Line 59: | Line 59: | ||
* Item 6 | * Item 6 | ||
}} | }} | ||
| | |- | ||
| style="text-align: left; background-color: white;" |<pre> | |||
{{columns|count=4| | |||
<pre> | |||
{{columns| | |||
* Item 1 | * Item 1 | ||
* Item 2 | * Item 2 | ||
* Item 3 | * Item 3 | ||
* Item 4 | * Item 4 | ||
}} | }} | ||
</pre> | </pre> | ||
| style="background-color: white;" |{{columns|count=4| | |||
* Item 1 | |||
* Item 2 | |||
* Item 3 | |||
* Item 4 | |||
}} | |||
|} | |||
===Parameters=== | ===Parameters=== | ||
Revision as of 21:41, 17 April 2025
Description
This template allows you to display content in multiple columns on a page. By default, it divides the content into three columns, but you can customize the number of columns by using the count= parameter. Optionally, you can add custom inline styles using the style= parameter to adjust the appearance of the columns.
Usage
| Example: Default Usage When used with no additional parameters, the template will return a 3 column list. | |
|---|---|
| You Type | You Get |
{{columns|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
|
|
| Example: Count Parameter You can specify the number of columns in the output through use of the |count= parameter.
| |
|---|---|
| You Type | You Get |
{{columns|count=2|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
|
|
{{columns|count=4|
* Item 1
* Item 2
* Item 3
* Item 4
}}
|
|
Parameters
- `count` (optional): Specifies the number of columns. Defaults to 3 if not provided.
- `style` (optional): Additional inline CSS styles to apply to the container div.