{{Columns}} may be used to create up to ten columns across a page.

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 -->
| col3width = 
| col3 = 
...
| col10width = 
| col10 = 
}}

The parameters  colstyle  and  col1style  to  col10style  may also be used to tailor all and/or individual columns' سی ایس ایس 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



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

| 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.25 ''em''
{{!}}}
}}
Result

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?
Responsive/
Mobile suited
Start template Column divider End template
Float "col-float" ہاں ہاں {{col-float}} {{col-float-break}} {{col-float-end}}
"columns-start" ہاں ہاں {{columns-start}} {{column}} {{columns-end}}
Columns "div col" ہاں ہاں {{div col}} {{div col end}}
"columns-list" نہیں ہاں {{columns-list}} (wraps div col)
Flexbox "flex columns" نہیں ہاں {{flex columns}}
Table "col" ہاں نہیں {{col-begin}},
{{col-begin-fixed}} or
{{col-begin-small}}
{{col-break}} or
{{col-2}} .. {{col-5}}
{{col-end}}

Can template handle the basic wiki markup {| | || |- |} used to create tables? If not, special templates that produce these elements (such as {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}})—or HTML tags (<table>...</table>, <tr>...</tr>, etc.)—need to be used instead.