Difference between revisions of "Template:Multi-column"

From Custom Mario Kart
Jump to: navigation, search
m
m
Line 1: Line 1:
<includeonly><table class=multi-col><tr>
+
<includeonly><table class=multi-col {{#switch:{{{margin}}}|top=style=margin-top:-0.4em|bottom=style=margin-bottom:-0.8em|both=style=margin-top:-0.4em;margin-bottom:-0.8em}}><tr>
 
<td class=left-col style=width:{{#if:{{{3|}}}|28.64|42.96}}%>{{{1|}}}</td>
 
<td class=left-col style=width:{{#if:{{{3|}}}|28.64|42.96}}%>{{{1|}}}</td>
 
{{#if:{{{3|}}}|<td class=mid-col style=width:28.64%>{{{2|}}}</td>}}
 
{{#if:{{{3|}}}|<td class=mid-col style=width:28.64%>{{{2|}}}</td>}}
Line 11: Line 11:
  
 
==== Example with 2 columns ====
 
==== Example with 2 columns ====
{{multi-column | {{textbox|red|red|left column}}  
+
{{multi-column | margin=top
 +
  | {{textbox|red|red|left column}}  
 
   | {{textbox||blue|right column with a long long long long long long text}}  
 
   | {{textbox||blue|right column with a long long long long long long text}}  
 
}}
 
}}
  
 
==== Example with 3 columns ====
 
==== Example with 3 columns ====
{{multi-column | {{textbox|red|red|left column}}  
+
{{multi-column | margin=both
 +
  | {{textbox|red|red|left column}}  
 
   | {{textbox|green|green|middle column}}  
 
   | {{textbox|green|green|middle column}}  
 
   | {{textbox||blue|right column with a long long long long long long text}}  
 
   | {{textbox||blue|right column with a long long long long long long text}}  

Revision as of 10:11, 14 June 2015

Support of 2 or 3 columns

Usage: {{multi-column|left|middle|right}}

  • left: text of left column.
  • middle: text for middle column. Empty for 2-column design.
  • right: text of right column. In 3-column mode this column is wider (42%).

Example with 2 columns

red
left column
blue
right column with a long long long long long long text

Example with 3 columns

red
left column
green
middle column
blue
right column with a long long long long long long text