Template:Top: Difference between revisions
Jump to navigation
Jump to search
Documentation
(added some parameters) |
(expanding doc) |
||
Line 1: | Line 1: | ||
<includeonly>{|border="{{{border|0}}}" cellpadding="5" cellspacing="0" width={{{width|100%}}} | <includeonly>{|border="{{{border|0}}}" cellpadding="5" cellspacing="0" width={{{width|100%}}} | ||
|valign="top"|</includeonly><noinclude> | |valign="top"|</includeonly><noinclude> | ||
{{DisplayBox | {{DisplayBox|title=Documentation|text= | ||
Templates {{tl|top}}, {{tl|middle}} and {{tl|bottom}} allow a user to easily create a multi-column table. | |||
===Usage=== | |||
====for 2 columns==== | |||
'''<nowiki>{{top}}</nowiki>'''<br><br> | '''<nowiki>{{top}}</nowiki>'''<br> | ||
'' | ''<text of left column>''<br> | ||
'''<nowiki>{{ | '''<nowiki>{{middle}} or {{mdl}}</nowiki>'''<br> | ||
'' | ''<text of right column>''<br> | ||
'''<nowiki>{{bottom}} or {{btm}}</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> | |||
''<text of left column>''<br> | |||
'''<nowiki>|valign="top" width=50%|</nowiki>'''<br> | |||
''<text of right column>''<br> | |||
'''<nowiki>|}</nowiki>''' | |||
====for 3 or more columns==== | |||
'''<nowiki>{{top}}</nowiki>'''<br> | |||
''<text of left column>''<br> | |||
'''<nowiki>{{middle|3}}</nowiki>'''<br> | |||
''<text of center column>''<br> | |||
'''<nowiki>{{middle|3}}</nowiki>'''<br> | |||
''<text of right column>''<br> | |||
'''<nowiki>{{bottom}}</nowiki>''' | '''<nowiki>{{bottom}}</nowiki>''' | ||
===Optional parameters=== | |||
Use the optional parameters {{para|border}} and {{para|width}} inside '''<nowiki>{{top}}</nowiki>''' to define different values from their default ones ( 0px and 100%, respectively) | |||
'''<nowiki>{{top|border= |width= }}</nowiki>''' | |||
}} | }} | ||
[[Category:Table formatting templates]] | [[Category:Table formatting templates]] | ||
</noinclude> | </noinclude> |
Revision as of 16:08, 25 April 2013
Templates {{top}}, {{middle}} and {{bottom}} allow a user to easily create a multi-column table.
Usage
for 2 columns
{{top}}
<text of left column>
{{middle}} or {{mdl}}
<text of right column>
{{bottom}} or {{btm}}
It's equivalent to using the wiki code:
{|border="0" cellpadding="5" cellspacing="0" width=100%
|valign="top"|
<text of left column>
|valign="top" 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}}
Optional parameters
Use the optional parameters |border=
and |width=
inside {{top}} to define different values from their default ones ( 0px and 100%, respectively)
{{top|border= |width= }}