Template:Columns
Appearance
{{{col1}}} |
{{{col2}}} |
{{{col3}}} |
{{{col4}}} |
{{{col5}}} |
{{{col6}}} |
{{{col7}}} |
{{{col8}}} |
{{{col9}}} |
{{{col10}}} |
Template in the vein of navbox templates such as {{Navbox}} to aid the creation of (up to ten) columns across a page.
Syntax
[edit]{{columns |bgcol = <!--Background colo/ur (default none)--> |colwidth = <!--Width of each column (default 15em)--> |gap = <!--Gap between each column (default 1.25em)--> |col1width = <!--use to set a different width for col1--> |col1 = <!--mandatory--> |col2width = <!--use to set a different width for col2 (etc)--> |col2 = <!--mandatory--> |col3width = |col3 = ... |col7width = |col7 = |style = <!--Custom table styling (default none)--> |valign = <!--Optional vertical alignment of table cells--> }}
Examples
[edit]- Code
{{columns |col1 = Simplest<br/>instantiation<br/>of |col2 = this<br/>template }}
- Result
Simplest |
this |
|
- Code
{{columns |bgcol=beige |width=8.5em |gap=3.25em |col1 = * These * columns * are * more * complex |col2 = The<br/>background<br/>is<br/>beige |col3 = ; Each : column ; is : 8.5[[Em (typography)|em]] ; wide |col4 = {{(!}} !colspan="2"{{!}} and {{!-}} {{!}} the {{!!}} gap {{!-}} {{!}}colspan="2"{{!}} between {{!-}} {{!}} each {{!!}} is {{!-}} !colspan="2" align="center"{{!}} 3.25em {{!)}} }}
- Result
|
The |
|
|
|
See also
[edit]- {{multicol}}, {{multicol-break}}, {{multicol-section}}, {{multicol-end}}, this template uses a table to create multiple columns of text. You need to place the breaks explicitly, but they will never move.
- {{div col}}, {{div col end}}, which uses CSS3 properties to create columns dynamically. The reader's browser will choose where best to put the breaks, so the layout cannot be guaranteed not to change. This one is good for lists, as you don't need to worry about placing {{multicol-break}}s.