Template:Bottom: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(documentation)
No edit summary
 
Line 1: Line 1:
<includeonly>|}</includeonly><noinclude>
<includeonly>|}</includeonly><noinclude>
{{DisplayBox|bgcolor=g|title=Documentation|text=
{{Top/doc}}
This template, together with {{tl|top}} and {{tl|middle}}, allows a user to easily create a two-column table.
 
;Usage
 
'''<nowiki>{{top}}</nowiki>'''<br><br>
''...text of left column...''<br><br>
'''<nowiki>{{middle}}</nowiki>'''<br><br>
''...text of right column...''<br><br>
'''<nowiki>{{bottom}}</nowiki>'''
 
 
It's equivalent to using the wiki code:
 
<nowiki>{|border="0" cellpadding="5" cellspacing="0" width=100%</nowiki><br>
<nowiki>|valign="top"|</nowiki><br><br>
''...text of left column...''<br><br>
<nowiki>|valign="top" width=50%|</nowiki><br><br>
''...text of right column...''<br><br>
<nowiki>|}</nowiki>
}}


[[Category:Table formatting templates]]
[[Category:Table formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 16:46, 25 April 2013


Documentation

Templates {{top}}, {{middle}} and {{bottom}} allow a user to easily create a multi-column table. The shorter aliases {{top}}, {{mdl}} and {{btm}} may also be used.

Usage

for 2 columns

{{top}}
<text of left column>
{{middle}}
<text of right column>
{{bottom}}


It's equivalent to using the wiki code:

{|border="0" cellpadding="5" cellspacing="0" width=100%
|valign="baseline"|
<text of left column>
|valign="baseline" width=50%|
<text of right column>
|}


for 3 or more columns

{{top}}
<text of left column>
{{middle|3}}
<text of center column>
{{middle|3}}
<text of right column>
{{bottom}}

{{top}}
<text of left column>
{{middle|4}}
<text of center-left column>
{{middle|4}}
<text of center-right column>
{{middle|4}}
<text of right column>
{{bottom}}

and so on...

Optional parameters

Use the optional parameters |border= and |width= inside {{top}} to define different values from their default ones ( |border=0px and |width=100%, respectively)

{{top|border= |width= }}