Template:Columns-start
- Column 1
- Column 2
- Column 3
- Column 4
- Column 5
The {{Columns-start}} template and its dependent templates {{Column}} 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
Columns-start 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).
|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%.
|class=
- Defines CSS classes to apply to the surrounding div tags
{{Column}} has the same 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, be aware of the possible problem with a column that includes an equality symbol (=
).
Otherwise, {{Column}} must be used as above, following this template and (ultimately) followed by {{Columns-end}}.
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 standalone form will function, so long as there is some content beneath the second and subsequent headings. Also, these headings will not provide 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
- {{Column}}
- {{Columns-end}}