Template:Columns: Difference between revisions

From The Reed and Rite
No edit summary
No edit summary
Line 1: Line 1:
<div class="pillars" style="column-count: {{{count|3}}}; {{{style|}}};">
  {{{1}}}
</div>
<noinclude>
<noinclude>
==Description==
==Description==
Line 39: Line 43:
This will display the list in two columns.
This will display the list in two columns.


</noinclude>
==Template Code==
Here is the code for the template:
 
<pre>
<div class="pillars" style="column-count: {{{count|3}}}; {{{style|}}};">
<div class="pillars" style="column-count: {{{count|3}}}; {{{style|}}};">
   {{{1}}}
   {{{1}}}
</div>
</div>
</pre>
This code creates a `div` with the class "pillars" and applies the specified number of columns and styles.

Revision as of 22:57, 2 January 2025

 {{{1}}}


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

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.

Example

To display the list in two columns, use the `count` parameter like this:

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

This will display the list in two columns.

Template Code

Here is the code for the template:

<div class="pillars" style="column-count: {{{count|3}}}; {{{style|}}};">
  {{{1}}}
</div>

This code creates a `div` with the class "pillars" and applies the specified number of columns and styles.