Template:Div col/doc: Difference between revisions

From FamilySearch Wiki
(Created page with '{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --> This template is used to make a list into columns, with the option of specifyi…')
 
(edit)
 
Line 118: Line 118:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
[[Category:Table and column templates|{{PAGENAME}}]]
[[Category:Table and column templates|{{PAGENAME}}]]
{{#switch:{{PAGENAME}}
|Div col = [[hr:Predložak:Div col]][[id:Templat:Div col]][[it:Template:Div col]][[ja:Template:Div col]][[pt:Predefinição:Div col]][[vi:Tiêu bản:Div col]][[zh:Template:Div col]]
|Div col end = [[hr:Predložak:Div col end]][[it:Template:Div col end]][[ja:Template:Div col end]][[pt:Predefinição:Div col fim]][[vi:Tiêu bản:Div col end]][[zh:Template:Div col end]]
}}
</includeonly>
</includeonly>

Latest revision as of 06:26, 5 January 2010

This template is used to make a list into columns, with the option of specifying a smaller font. It has the advantage over other column templates (i.e. {{col-begin}}) that it automatically breaks each column to an equal space, so you do not manually have to find the "half way" point on two columns, for instance.

This template can create multiple columns in web browsers which support one of the following CSS properties:

Therefore, the template does not work in browsers such as Internet Explorer and Opera (see Template:Reflist).

Usage[edit source]

cols =
Specifies the number of columns. Defaults to 2.
colwidth =
Can be used instead of cols to set the number of columns based on width instead. colwidth=200px will result in more columns being shown on wider displays, while colwidth=33% will result in three columns.
small =
Specifies small font size (90%) if set to yes.

Examples[edit source]

{{Div col}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
Produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
{{Div col|cols=3}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
Produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
{{div col|colwidth=10em}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
Produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
{{Div col|small=yes}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
Produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h

See also[edit source]