Columns are not supported by some older browsers, most notably Internet Explorer 9 and below and Opera 11.0 and below. See this page for more information. |
{{Div col}} can be used to make a list into columns that wrap properly and compatibly with portable computer devices, esp. PAD operating systems and small screens. It automatically breaks the available space into equal spaces, meaning, for instance, that it is not necessary to work out the halfway point, or the one-third & two-thirds points between two columns.
|content=
parameter (which can be restrictive of what content is allowed; e.g., wiki markup like | must somehow be escaped) or terminated with {{div col end}}. The {{columns-list}} wrapper uses the parameter method for providing content (including its limitations).|small=yes
), place vertical lines parameter ("rules") between the columns (|rules=
) and to add other custom styling parameter (|style=
).{{Div col}} can create multiple columns in web browsers which support one of the following CSS properties:
There are six parameters for this template and their usage is described below.
|cols=
or first unnamed parameter|colwidth=
or second unnamed parametercolwidth=20em
|rules=
yes
or some CSS styling (e.g. 1px dashed blue;
).|gap=
gap=2em
. The default spacing (set by browser) is 1em.|style=
|content=
Usage of fixed column counts is deprecated, therefore this example should no longer be used as well.
{{Div col}} * a * b * c * d * e * f * g * h {{Div col end}}
When parameters are named in the template, they can be used in any order. Example:
{{Div col|colwidth=10em|rules=yes|gap=2em|small=yes}} * a * b * c * d * e * f * g * h {{Div col end}}
or
{{Div col|rules=yes|gap=2em|small=yes|colwidth=10em}} * a * b * c * d * e * f * g * h {{Div col end}}
and exactly the same result below
When parameters are not named then template considers first unnamed parameter to be "cols", second unnamed parameter to be "colwidth", remaining unnamed parameters (e.g. third, fourth, fifth, etc. unnamed parameter) will be ignored by the template without providing an error message. The first and second parameter "cols" and "colwidth" could be unnamed but all other parameters (such as "rules", "gap", "style" and "small") must always be named in the template.
Note the empty column for the "number of columns" between "Div col" and "10em".
{{div col||10em|rules=yes|gap=2em|small=yes}} * a * b * c * d * e * f * g * h {{div col end}}
Note that the unnamed third, fourth and fifth parameters will be ignored by the template. If used, then third, fourth and fifth parameters must always be named.
{{div col||10em|yes|2em|yes}} * a * b * c * d * e * f * g * h {{div col end}}
Important: Use of now-deprecated "cols" parameter is discouraged, leave it blank and instead use the "colwidth" parameter.
{{Div col|3}} * a * b * c * d * e * f * g * h {{Div col end}}
{{Div col|4}} * a * b * c * d * e * f * g * h {{Div col end}}
Important: The usage of the previous parameter "cols" is deprecated. It is strongly recommended to not use now-deprecated "cols" parameter (please leave it blank) and instead use "colwidth" parameter.
Note the empty column for the "number of columns" between "Div col" and "10em". {{div col||10em}} * a * b * c * d * e * f * g * h {{div col end}}
{{div col||20em}} * a * b * c * d * e * f * g * h {{div col end}}
{{div col||30em}} * a * b * c * d * e * f * g * h {{div col end}}
{{div col||10em}} a b c d e f g h {{div col end}}
a b c d e f g h
{{Div col|rules=yes}} * a * b * c * d * e * f * g * h {{Div col end}}
{{Div col|colwidth=10em|rules=yes|gap=2em}} * a * b * c * d * e * f * g * h {{Div col end}}
{{Div col|small=yes}} * a * b * c * d * e * f * g * h {{Div col end}}
{{Div col end}}
{{Div col|colwidth=10em|content= * a * b * c * d * e * f * g * h }}
TemplateData for Div col end
Ends a multi-column list started by {{div col}}. It takes no parameters.
Parameter | Description | Type | Status | |||
---|---|---|---|---|---|---|
No parameters specified |