Template:Div col/doc

From SPCodex, The Smashing Pumpkins wiki

{{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}}.

Template parameters

ParameterDescriptionTypeStatus
Column widthcolwidth

Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays.

Example
30em
Stringoptional
Rulesrules

Produces vertical rules between the columns if set to yes.

Example
'yes' or '1px dashed blue'
Stringoptional
Gap sizegap

Specifies the space between the content of adjacent columns.

Example
2em
Stringoptional
CSS stylestyle

Specifies any custom styling.

Stringoptional
Contentcontent

Specifies the content to divide into columns

Stringoptional
Small fontsmall

Use a smaller font size (90%)

Default
no
Example
yes
Stringoptional