Difference between revisions of "Template:Columns/doc"

From blackwiki
Jump to navigation Jump to search
imported>DixonDBot
m (Migrating 9 interwiki links, now provided by Wikidata on d:Q5901482)
imported>Funandtrvl
(add tmp)
Line 103: Line 103:
 
}}
 
}}
  
==See also==
+
== See also ==
* {{tl|Columns-list}}
+
{{column templates/others}}
* {{tl|Col-begin}} ({{tl|Col-start}}), {{tl|Col-begin-small}} {{lts/|Col-begin}}
 
** {{tl|Col-break}}
 
** {{tl|Col-2}} <small>({{tl|Col-1-of-2}}, {{tl|Col-2-of-2}})</small>
 
** {{tl|Col-3}} <small>({{tl|Col-1-of-3}}, {{tl|Col-2-of-3}}, {{tl|Col-3-of-3}})</small>
 
** {{tl|Col-4}} <small>({{tl|Col-1-of-4}}, {{tl|Col-2-of-4}}, {{tl|Col-3-of-4}}, {{tl|Col-4-of-4}})</small>
 
** {{tl|Col-5}} <small>({{tl|Col-1-of-5}}, {{tl|Col-2-of-5}}, {{tl|Col-3-of-5}}, {{tl|Col-4-of-5}}, {{tl|Col-5-of-5}})</small>
 
* {{tl|Col-end}} ({{tl|End}})
 
* {{tl|Top}}, {{tl|Mid}}, {{tl|Bottom}}
 
* {{tl|Columns-start}}, {{tl|Column}}, {{tl|Columns-end}} {{lts/|Columns-start}}
 
* {{tl|Multicol}}, {{tl|Multicol-break}}, {{tl|Multicol-end}} {{lts/|Multicol}}
 
* {{tl|Div col}}, {{tl|Div col end}} {{lts/|Div col}}
 
  
 
<includeonly>
 
<includeonly>
 
<!--Categories-->
 
<!--Categories-->
[[Category:Table and column templates|{{PAGENAME}}]]
+
[[Category:Table and column templates]]
 
 
<!--Other languages-->
 
 
</includeonly>
 
</includeonly>

Revision as of 22:29, 8 November 2013

Template in the vein of navbox templates such as {{Navbox}} to aid the creation of (up to ten) 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/>application<br/>of
|col2 = this<br/>template
}}
Result



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

See also

Column-generating template families

<section begin="table" />

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

File:Dagger-14-plain.png I.e., 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.<section end="table" />