• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.215
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Columns

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
This template is currently being deleted.
This template is being removed from the pages on which it is currently used, according to the specific instructions at Wikipedia:Templates for discussion/Holding cell, after which it will be deleted. Please do not use it on any additional pages, but do not remove it from pages if it is under deletion review. The decision to delete this template was made following this discussion initiated on 20 December 2020 at Templates for discussion.
Administrators: Please review this template's instructions at Wikipedia:Templates for discussion/Holding cell before proceeding with any action.
{{{col1}}} {{{col2}}}
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]

{{Columns}} may be used to create up to 2 (two) columns across a page.

CautionThis template creates a table rather than actual columns. This means that it may displays poorly on mobile devices or narrow screens and is sub-optimal in terms of accessibility. Approximately half of the readers of English Wikipedia articles are using mobile devices and may have trouble reading the content that is wrapped in this template. Please consider using one of the CSS-based column templates listed in the § See also section instead, or not using columns at all if there is any trouble affects page layout.

Contents

  • 1 Syntax
  • 2 Examples
  • 3 See also
    • 3.1 Column-generating template families

Syntax

Values for col1 and col2, i.e. the contents of the first and second columns, are expected.

{{Columns
| background =   <!-- Background (default is none) -->
| style =        <!-- Use to add extra overall CSS styling -->
| colwidth =     <!-- Width of each column (default 15.0em) -->
| gapbetween =   <!-- Gap (gutter) between each column (default 1.25em) -->
| col1width =    <!-- Use to set a custom width for col1 -->
| col1 =         <!-- (REQUIRED) First column's contents -->
| col2width =    <!-- Use to set a custom width for col2 (and so on) -->
| col2 =         <!-- (REQUIRED) Second column's contents -->
}}

The parameters  colstyle  and  col1style  to  col2style  may also be used to tailor all and/or individual columns' CSS styling.

Examples

Code
{{Columns
| col1 = This is a simple application of the columns template, demonstrating the default column widths
| col2 = and gaps between columns. See the next example for a more customized use of the template.
}}
Result
This is a simple application of the columns template, demonstrating the default column widths and gaps between columns. See the next example for a more customized use of the template.



Code
{{Columns |background=beige |colwidth=8.5em |gap<!--between-->=3.25em

| col1 =
* These
* columns
* are
* more
* complex

| col2 =
The<br />background<br />is<br />beige
}}
Result
  • These
  • columns
  • are
  • more
  • complex
The
background
is
beige

See also

Column-generating template families

The templates listed here are not interchangeable. For example, using {{col-float}} with {{col-end}} instead of {{col-float-end}} would leave a HTML "div" (division) open, potentially harming any subsequent formatting.

Column templates
Type Family
Handles wiki
 table code?File:Dagger-14-plain.png
Responsive/
Mobile suited
Start template Column divider End template
Float "Col-float" Yes Yes {{Col-float}} {{Col-float-break}} {{Col-float-end}}
"Columns-start" Yes Yes {{Columns-start}} {{Column}} {{Columns-end}}
Columns "Div col" Yes Yes {{Div col}} – {{Div col end}}
"Columns-list" No Yes {{Columns-list}} (wraps div col) – –
Flexbox "Flex columns" No Yes {{Flex columns}} – –
Table "Col" Yes No {{Col-begin}},
{{Col-begin-fixed}} or
{{Col-begin-small}}
{{Col-break}} or
{{Col-2}} .. {{Col-5}}
{{Col-end}}

File:Dagger-14-plain.png Can the columns handle the wiki markup {| | || |- |} used to create tables? If not, templates that produce these elements (such as {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}) or HTML tags (<table>...</table>, <tr>...</tr>, etc.) will need to be used instead.

The above documentation is transcluded from Template:Columns/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Columns&oldid=9428"
Categories:
  • Wikipedia templates currently being merged or deleted
  • Pages using columns with the default column width
  • Pages with broken file links
  • Multi-column templates
Last edited on 6 January 2021, at 21:37

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 6 January 2021, at 21:37.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop