3,554
edits
No edit summary |
(Improved examples.) |
||
Line 23: | Line 23: | ||
{{clear}} | {{clear}} | ||
===Advanced Usage=== | ===Advanced Usage=== | ||
If this isn't enough, the template can be used in parts instead, for more flexible use within tables and div boxes.<br> | If this isn't enough, the template can be used in parts instead, for more flexible use within tables and div boxes. Advanced wiki-coding knowledge is suggested for using the hide template in this way.<br> | ||
For advanced usage, use this code: | For advanced usage, use this code: | ||
<div style="float:left; margin-right:20px"><pre> | <div style="float:left; margin-right:20px"><pre> | ||
Line 34: | Line 34: | ||
==Example== | ==Example== | ||
To hide some text, use the following: | To hide some text, use the following: | ||
<pre> | <div style="float:left; margin-right:20px"><pre> | ||
{{Hide|This is hidden text.}} | {{Hide|This is hidden text.}} | ||
</pre> | </pre></div>{{clear}} | ||
This results in: | This results in: | ||
{{Hide|This is hidden text.}} | {{Hide|This is hidden text.}} | ||
{{clear}} | |||
Alternatively: | Alternatively: | ||
<pre> | <div style="float:left; margin-right:20px"><pre> | ||
{{Hide|content=This is hidden text.}} | {{Hide|content=This is hidden text.}} | ||
</pre> | </pre></div>{{clear}} | ||
This results in: | This results in: | ||
{{Hide|content=This is hidden text.}} | {{Hide|content=This is hidden text.}} | ||
{{clear}} | |||
To change what the buttons say: | To change what the buttons say: | ||
<pre> | <div style="float:left; margin-right:20px"><pre> | ||
{{Hide|show=[Unearth hidden secrets]|hide=[I'm done looking]|content=This is hidden text.}} | {{Hide|show=[Unearth hidden secrets]|hide=[I'm done looking]|content=This is hidden text.}} | ||
</pre> | </pre></div>{{clear}} | ||
This results in: | This results in: | ||
{{Hide|show=[Unearth hidden secrets]|hide=[I'm done looking]|content=This is hidden text.}} | {{Hide|show=[Unearth hidden secrets]|hide=[I'm done looking]|content=This is hidden text.}} | ||
{{clear}} | |||
An advanced example placing the template within a formatted table: | |||
<div style="float:left; margin-right:20px;"><pre> | |||
{| cellspacing="3" align="left" style="border: 2px solid blue; background-color: #transparent;" | |||
|- valign="top" | |||
| style="border: 2px solid blue; background-color: #white;padding-left: 6px;"| | |||
<font size=3 color="black"><b>{{hide|~button|style=float:left;}}</b></font>:{{hide|~content|style=float:right;|content=This is hidden text.}} | |||
|} | |||
</pre></div>{{clear}} | |||
This results in: | |||
{| cellspacing="3" align="left" style="border: 2px solid blue; background-color: #transparent;" | |||
|- valign="top" | |||
| style="border: 2px solid blue; background-color: #white;padding-left: 6px;"| | |||
<font size=3 color="black"><b>{{hide|~button|style=float:left;}}</b></font>:{{hide|~content|style=float:right;|content=This is hidden text.}} | |||
|} | |||
{{clear}} | |||
{{Cat|Formatting Templates}}</noinclude> | {{Cat|Formatting Templates}}</noinclude> |