Template:Column
- Column 1
- Column 2
- Column 3
- Column 4
- Column 5
The {{Column}} template and its related templates {{Columns-start}} and {{Columns-end}} can be used to make a fixed number of columns (up to five) that will span the width of the page above a certain minimum width (100em for five columns, 80 for four, 60 for three and two). Below the minimum width, each column starting from the right will be automatically shifted to display below the previous row of columns.
Use
The below examples are using the templates directly, so you can see what will happen if the minimum size is reached.
{{Columns-start}}
Column 1 here
{{Column}}
Column 2 here
{{Columns-end}}
{{Columns-start|num=3}}
Column 1 here
{{Column|num=3}}
Column 2 here
{{Column|num=3}}
Column 3 here
{{Columns-end}}
{{Columns-start|num=4}}
Column 1 here
{{Column|num=4}}
Column 2 here
{{Column|num=4}}
Column 3 here
{{Column|num=4}}
Column 4 here
{{Columns-end}}
{{Columns-start|num=5}}
Column 1 here
{{Column|num=5}}
Column 2 here
{{Column|num=5}}
Column 3 here
{{Column|num=5}}
Column 4 here
{{Column|num=5}}
Column 5 here
{{Columns-end}}
Parameters
{{Column}} has these parameters:
|num=
- Defines the number of columns, accepting integers between 2 and 5, inclusive; defaults to 2. More than five columns must find another solution (such as a wikitable for tabular content). (required for more than two columns)
|bgcolor=
- Define a background color using a short or long hex code (#rgb and #rrggbb, respectively) or a named CSS color; defaults to transparent.
|width=
- Define a portion of the page width for all columns to use in aggregate; defaults to 100%.
{{Column}} only uses the last two parameters where it is used as a standalone template with the contents of all columns supplied as positional (numbered) parameters. Example:
{{Column
| 1 =
Column 1 here
| 2 =
Column 2 here
}}
{{Column|num=3
| Column 1 here
| Column 2 here
| Column 3 here
}}
In the second example where the positional parameters are unnamed, be aware of likely problems when the contents of any of the columns includes an equality symbol (=
).
Otherwise, {{Column}} must be used as shown originally, sandwiched between {{Columns-start}} and {{Columns-end}} and with its own |num=
parameter whose value matches the one supplied to {{Columns-start}}.
Example
Indonesian palaces
- Istana Bogor
- Istana Luwu
- Istana Maimun
- Istana Merdeka
- Istana Negara, Jakarta
- Istana Wakil Presiden
Indonesian prisons
- Kambangan Island
Cities in Indonesia with shopping malls
- Jakarta
- Bandung
- Surabaya
- Batam
Towers in Indonesia
- Monumen Nasional
- Wisma 46
Limitations
Using headings inside {{Column}} in its wrapper form will function so long as there is some content beneath the 2nd and later headings. Secondly, headings will not carry an edit link. The below table may wrap (i.e. not display as columns) but displays the issue.
Content | Functional but missing edit links | Non-functional (missing content) |
---|---|---|
Wikitext | {{Column
| 1 =
==== Ex. heading 1 ====
ABC
| 2 =
==== Ex. heading 2 ====
DEF
}}
|
{{Column
| 1 =
==== Ex. heading 3 ====
| 2 =
==== Ex. heading 4 ====
}}
|
Rendered | Ex. heading 1ABC Ex. heading 2DEF |
Ex. heading 3
==== Ex. heading 4 ====
|
See also
- {{Columns-start}}
- {{Columns-end}}