Template:TwoColumns
From QED
Template to help create two columns across a page.
Contents |
Syntax
{{TwoColumns
|bgcolor = <!--Background color (default: transparent)-->
|width = <!--Width of each column (default 10em)-->
|margin= <!-- left and right margin widths (default 1em) -->
|gap = <!--Gap between each column (default 1.25em)-->
|gapcolor = <!--Gap color (default: bgcolor or else transparent) -->
|col1width = <!--use to set a different width for col1-->
|col1 = <!--text for column 1 -->
|col2width = <!--use to set a different width for col2 -->
|col2 = <!--text for column 2 -->
}}
Examples
- Code
{{TwoColumns
|col1 = The simplest possible instantiation of
|col2 = this template produces fair results.
}}
- Result
|
The simplest possible instantiation of |
this template produces fair results. |
- Code
{{TwoColumns
|col1 = Use <br/><br/>to control
|col2 = line<br/>breaks
}}
- Result
|
Use <br/> |
line |
- Code
{{TwoColumns |bgcolor=beige |width=8.5em |gap=3.25em
|col1 =
* These
* columns
* are
* more
* complex
|col2 =
The<br/>background<br/>is<br/>beige
}}
- Result
|
The |
Embedded Tables
Tables can be embedded using wiki syntax except that {{!}} must be used instead of | and similarly for {{!!}} and {{!-}}.
- Code
{{TwoColumns |bgcolor=beige |width=8.5em |gap=3.25em |gapcolor=silver
|col1 =
Each beige column is 8.5[[wikipedia:Em (typography)|em]] wide
|col2 =
{{{!}} style="width:8em"
!colspan="2"{{!}} Embedded<br/>Table
{{!-}}
{{!}} Cell 1 {{!!}} Cell 2
{{!-}}
{{!}}colspan="2" align="center"{{!}} Spanning
{{!-}}
{{!}} Gap size {{!!}} 3.25em
{{!-}}
!colspan="2" align="center"{{!}} gapcolor silver
{{!}}}
}}
- Result
|
Each beige column is 8.5em wide |
| |||||||||||||












