Template:Columns: Difference between revisions
mNo edit summary |
|||
| Line 77: | Line 77: | ||
|- | |- | ||
| style="text-align: left; background-color: white;" |<pre> | | style="text-align: left; background-color: white;" |<pre> | ||
{{columns|style=font-size: | {{columns|style=font-size: 150%; border: 1px solid #ddd; background-color: #efefef;| | ||
* Item 1 | * Item 1 | ||
* Item 2 | * Item 2 | ||
| Line 86: | Line 86: | ||
}} | }} | ||
</pre> | </pre> | ||
| style="background-color: white;" |{{columns|style=font-size: | | style="background-color: white;" |{{columns|style=font-size: 150%; border: 1px solid #ddd; background-color: #efefef;| | ||
* Item 1 | * Item 1 | ||
* Item 2 | * Item 2 | ||
| Line 93: | Line 93: | ||
* Item 5 | * Item 5 | ||
* Item 6 | * Item 6 | ||
}} | |||
|- | |||
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Numbered List</span><br><span style="font-weight: normal;">A numbered list can be used by replacing <code>*</code> with <code>#</code>.</span> | |||
|- | |||
! width=25%|You Type | |||
!You Get | |||
|- | |||
| style="text-align: left; background-color: white;" |<pre> | |||
{{columns| | |||
# Item A | |||
# Item B | |||
# Item C | |||
# Item D | |||
# Item E | |||
# Item F | |||
}} | |||
</pre> | |||
| style="background-color: white;" |{{columns| | |||
# Item A | |||
# Item B | |||
# Item C | |||
# Item D | |||
# Item E | |||
# Item F | |||
}} | }} | ||
|} | |} | ||
Revision as of 22:03, 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
| Default Usage When used with no additional parameters, the template will return a list split in 3 columns. | |
|---|---|
| You Type | You Get |
{{columns|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
|
|
| 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
}}
|
|
| Style Parameter By passing the |style= parameter, you can alter the appearance of the column container using inline CSS styles.Note: They styles used in the example below are by no means exhaustive of the possible styles. | |
| You Type | You Get |
{{columns|style=font-size: 150%; border: 1px solid #ddd; background-color: #efefef;|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
|
|
| Numbered List A numbered list can be used by replacing * with #.
| |
| You Type | You Get |
{{columns|
# Item A
# Item B
# Item C
# Item D
# Item E
# Item F
}}
|
|