Template:Columns: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Creating template.)
 
m (Fixing my screw-up.)
 
Line 1: Line 1:
{| style="background:{{{bgcol|transparent}}}; {{{bodystyle|}}}" cellspacing="0" cellpadding="0"
    {| style="background:{{{bgcol|transparent}}}; {{{bodystyle|}}}" cellspacing="0" cellpadding="0"
|- valign="top"
|- valign="top"
|style="width:{{{col1width|{{{colwidth|{{{width|15em}}}}}}}}};"|
|style="width:{{{col1width|{{{colwidth|{{{width|15em}}}}}}}}};"|
Line 48: Line 48:
}}
}}
|}<noinclude>
|}<noinclude>
Template in the vein of navbox templates such as {{tl|Navbox}} to aid the creation of (up to seven) columns across a page.
Template in the vein of navbox templates such as {{tl|Navbox}} to aid the creation of (up to seven) Columns across a page.


== Syntax ==
== Syntax ==
<pre>
<pre>
{{columns
{{Columns
|bgcol    =      <!--Background colo/ur (default none)-->
|bgcol    =      <!--Background colo/ur (default none)-->
|colwidth  =      <!--Width of each column (default 15em)-->
|colwidth  =      <!--Width of each Column (default 15em)-->
|gap      =      <!--Gap between each column (default 1.25em)-->
|gap      =      <!--Gap between each Column (default 1.25em)-->
|col1width =      <!--use to set a different width for col1-->
|col1width =      <!--use to set a different width for col1-->
|col1      =      <!--mandatory-->
|col1      =      <!--mandatory-->
Line 71: Line 71:
; Code
; Code
<pre>
<pre>
{{columns
{{Columns
|col1 = Simplest<br/>instantiation<br/>of
|col1 = Simplest<br/>instantiation<br/>of
|col2 = this<br/>template
|col2 = this<br/>template
Line 78: Line 78:


; Result
; Result
{{columns
{{Columns
|col1 = Simplest<br/>instantiation<br/>of
|col1 = Simplest<br/>instantiation<br/>of
|col2 = this<br/>template
|col2 = this<br/>template
Line 86: Line 86:
; Code
; Code
<pre>
<pre>
{{columns |bgcol=beige |width=8.5em |gap=3.25em
{{Columns |bgcol=beige |width=8.5em |gap=3.25em


|col1 =
|col1 =
* These
* These
* columns
* Columns
* are
* are
* more
* more
Line 99: Line 99:


|col3 =
|col3 =
; Each : column
; Each : Column
; is  : 8.5[[Em (typography)|em]]
; is  : 8.5[[Em (typography)|em]]
; wide
; wide
Line 119: Line 119:


; Result
; Result
{{columns |bgcol=beige |width=8.5em |gap=3.25em
{{Columns |bgcol=beige |width=8.5em |gap=3.25em


|col1 =
|col1 =
* These
* These
* columns
* Columns
* are
* are
* more
* more
Line 132: Line 132:


|col3 =
|col3 =
; Each : column
; Each : Column
; is  : 8.5{{w|Em (typography)|em}}
; is  : 8.5
; wide
; wide



Latest revision as of 19:20, 14 July 2011

{{{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 seven) Columns across a page.

Syntax

{{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      = 
}}

Examples

Code
{{Columns
|col1 = Simplest<br/>instantiation<br/>of
|col2 = this<br/>template
}}
Result

Simplest
instantiation
of

this
template







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
  • These
  • Columns
  • are
  • more
  • complex

The
background
is
beige

Each
Column
is
8.5
wide
and
the gap
between
each is
3.25em