Template:Columns: Difference between revisions

From The Reed and Rite
No edit summary
Tag: Manual revert
mNo edit summary
Line 6: Line 6:


==Usage==
==Usage==
To use this template, wrap the content you want to display in columns like this:
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
 
|-
<pre>
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Example: Tag Only</span><br><span style="font-weight: normal;">[Brief Explanation here]</span>
|-
! width=25%|You Type
!You Get
|-
| style="text-align: left; background-color: white;" |<pre>
{{columns|
{{columns|
* Item 1
* Item 1
Line 18: Line 23:
}}
}}
</pre>
</pre>
| style="background-color: white;" |{{columns|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
|}


The above example will display the list in three columns by default.


===Parameters===
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
* `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.
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Example: Tag Only</span><br><span style="font-weight: normal;">[Brief Explanation here]</span>
 
|-
===Example===
! width=25%|You Type
To display the list in two columns, use the `count` parameter like this:
!You Get
|-
| style="text-align: left; background-color: white;" |<pre>
{{columns|count=2|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
</pre>
| style="background-color: white;" |{{columns|count=2|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
|}
To use this template, wrap the content you want to display in columns like this:


<pre>
<pre>
{{columns|count=2|
{{columns|
* Item 1
* Item 1
* Item 2
* Item 2
Line 39: Line 73:
</pre>
</pre>


This will display the list in two columns.
The above example will display the list in three columns by default.
 
===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.
 
== Articles Using Template ==
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 25 pages}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=25}}
 


[[Category: Templates]]
[[Category: Templates]]
</noinclude>

Revision as of 17:29, 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: Tag Only
[Brief Explanation here]
You Type You Get
{{columns|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
  • Item 6


Example: Tag Only
[Brief Explanation here]
You Type You Get
{{columns|count=2|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}
  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
  • Item 6

To use this template, wrap the content you want to display in columns like this:

{{columns|
* Item 1
* Item 2
* Item 3
* Item 4
* Item 5
* Item 6
}}

The above example will display the list in three columns by default.

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.

Articles Using Template