This template formats text into the specified number of columns, or into however many columns that will fit given columns of a specified width. It is especially useful to wrap long lists of items into multiple columns to maximize horizontal space.
Uses CSS columns
, column-count
and column-width
.
Usage
{{Columns|# of columns OR pixel/percentage width|list or text}}
.
Parameters
- 1 (required)
- Passed to CSS columns style. This may either be a column width (as a px, %, em, etc), a column count (a number without a unit), or both by separating each with a space (in which case they can be in either order).
- 2 (required)
- The content, typically a list of values or elements.
- width
- Shortcut to set max-width on encapsulating div.
- column-width
- Explicitly set column-width.
- column-count
- Explicitly set column-count.
Examples
Fixed number of columns
For example the code bellow will split the list into 2 columns:
{{Columns|2| * 1 * 2 * 3 * 4 * 5 * 6 }}
Result:
- 1
- 2
- 3
- 4
- 5
- 6
Fixed column width
And the following will split the list into columns of 50px each. Note that this is only a minimum width suggestion to the browser, and may be problematic when used in tables as the columns will not expand the table, resulting in only a single column being used.
{{Columns|200px| * 1 * 2 * 3 * 4 * 5 * 6 }}
Result:
- 1
- 2
- 3
- 4
- 5
- 6
The above documentation is transcluded from Template:Columns/doc. (edit | history)