Difference between revisions of "Template:Side box"

From Self-sufficiency
Jump to: navigation, search
(implement plainlinks lower down the tree, so side boxes can have external link icons if they want)
(create)
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table class="metadata mbox-small{{#ifeq:{{lc:{{{position|}}}}}|left|-left}} {{{class|}}}" style="border:1px solid #aaa; background-color:#f9f9f9; {{{style|}}}">
+
<table class="metadata plainlinks ombox-small" style="{{#ifeq:{{lc:{{{position|}}}|left|clear:left; float:left; margin:4px 1em 4px 0;}} border:1px solid #aaa; background-color:#f9f9f9; {{{style|}}}">
 
<tr>
 
<tr>
{{#switch:{{{image|}}}
+
{{#if:{{{image|}}}
|<!--BLANK-->|none={{td}}
+
|<td class="mbox-image">{{{image}}}</td>
|#default=<td class="mbox-image">{{{image}}}</td>
+
|<!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 0px; width: 1px;"></td>
 
}}
 
}}
 
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
 
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
Line 10: Line 10:
 
}}
 
}}
 
</tr>
 
</tr>
{{#if:{{{below|}}}
 
| <tr><td colspan={{#if:{{{imageright|}}}|3|2}} class="mbox-text" style="{{{textstyle|}}}"> {{{below}}} </td></tr>
 
}}
 
 
</table><noinclude>
 
</table><noinclude>
  

Revision as of 22:58, 1 December 2008