Difference between revisions of "Template:Warningbox"

From Fallen Sword Wiki
Jump to: navigation, search
(add usage + tweak template)
(add default values + allow control of width)
Line 1: Line 1:
 
<center>
 
<center>
{| width="auto" cellpadding="0" cellspacing="5" style="border-left:8px solid red; border-top:1px solid gray; border-right: 1px solid gray; border-bottom: 1px solid gray; background:#FEF0CE;"
+
{| width="{{{Width|auto}}}" cellpadding="0" cellspacing="2" style="border-left:8px solid red; border-top:1px solid gray; border-right: 1px solid gray; border-bottom: 1px solid gray; background:#FEF0CE;"
 
| rowspan=2 style="width:auto; padding: 5px;" align="left" valign="middle" | http://upload.wikimedia.org/wikipedia/en/f/f4/Ambox_content.png
 
| rowspan=2 style="width:auto; padding: 5px;" align="left" valign="middle" | http://upload.wikimedia.org/wikipedia/en/f/f4/Ambox_content.png
| align="left" valign="middle" style="font-weight:bold;font-family:sans-serif;font-variant:small-caps;" | {{{Title}}}
+
| align="left" valign="middle" style="font-weight:bold;font-family:sans-serif;font-variant:small-caps;" | {{{Title|Your title here}}}
 
|-
 
|-
| align="left" valign="middle" style="font-family:sans-serif;font-weight:normal;" | {{{Text}}}
+
| align="left" valign="middle" style="font-family:sans-serif;font-weight:normal;" | {{{Text|Your text here.}}}
 
|}
 
|}
 
</center>
 
</center>
Line 11: Line 11:
 
<code><pre>
 
<code><pre>
 
{{Warningbox
 
{{Warningbox
|Title=your-title-goes-here
+
|Title=Your title here
|Text=your-text-goes-here
+
|Text=Your text here.
 
}}</pre>
 
}}</pre>
 
</code>
 
</code>
 +
There is also a parameter that controls the width of the box. The default is "auto" which will let the box occupy whatever space it needs. It can be set to anything that HTML table understand for the width parameter (such as "60%" for percentage, "500" for pixel width)
 
[[Category:Templates|{{PAGENAME}}]]
 
[[Category:Templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Revision as of 16:13, 11 June 2009

Ambox_content.png Your title here
Your text here.

This template can be used as basis for warning messages, such as "needs info", "needs map" etc.

{{Warningbox
|Title=Your title here
|Text=Your text here.
}}

There is also a parameter that controls the width of the box. The default is "auto" which will let the box occupy whatever space it needs. It can be set to anything that HTML table understand for the width parameter (such as "60%" for percentage, "500" for pixel width)