Template:Div col/doc
This is a documentation subpage for Template:Div col. It contains usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
{{Div col}} formats a list into columns that wrap properly and compatibly with portable computer devices, especially PAD operating systems and small screens.
Purpose[edit source]
It automatically breaks the available screen space into equal parts, meaning, for instance, that it is not necessary to guess how many columns to use and then figure out the dividing point(s), e.g., the halfway point to divide the list into two columns, or the one-third and two-thirds points to divide the list into three columns.
- The list content is either provided by the
|content=
parameter (which can be restrictive of what content is allowed; e.g., wiki markup such as the | character must somehow be escaped), or terminated with {{div col end}}. - The template system (family) also offers parameter options to set a smaller (90%) font-size parameter (
|small=yes
), place vertical lines parameter ("rules") between the columns (|rules=
) and to add other custom styling (|style=
).
Parameters[edit source]
Breaks a list into columns. It automatically breaks each column to an equal space, so you do not manually have to find the half way point on two columns. The list is provided by |content= or closed with {{div col end}}.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Column width | colwidth | Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays.
| String | optional |
Rules | rules | Produces vertical rules between the columns if set to yes.
| String | optional |
Gap size | gap | Specifies the space between the content of adjacent columns.
| String | optional |
CSS style | style | Specifies any custom styling. | String | optional |
Content | content | Specifies the content to divide into columns | String | optional |
Small font | small | Use a smaller font size (90%)
| String | optional |