Template:Scroll box: Difference between revisions
From MediaWiki
Jump to navigationJump to search
mNo edit summary |
Tigerpaw28 (talk | contribs) Updating documentation format |
||
| Line 1: | Line 1: | ||
<includeonly> | |||
<table class="scrollbox" cellpadding="0" cellspacing="0" border="0" style="width:{{{width|100%}}};"><tr><td><div style="height:{{{height|100px}}}; width:{{{width|100%}}};"> | <table class="scrollbox" cellpadding="0" cellspacing="0" border="0" style="width:{{{width|100%}}};"><tr><td><div style="height:{{{height|100px}}}; width:{{{width|100%}}};"> | ||
{{{content|{{{1}}}}}} | {{{content|{{{1}}}}}} | ||
</div></td><td style="width:8px;"></td></tr></table><noinclude>__NOTOC__ | </div></td><td style="width:8px;"></td></tr></table> | ||
==Usage | </includeonly> | ||
<noinclude> | |||
__NOTOC__ | |||
==Description== | |||
Creates a scrollable box of text. | |||
==Usage== | |||
===Parameters=== | |||
====Required==== | |||
* ''content'' - The text to show in the box. If no height and width are specified, this can be passed as an unnamed variable instead. | |||
====Optional==== | |||
* ''height'' - The height of the box. Can be specified as a fixed number of pixels or a percentage. Defaults to 400 pixels, the former scroll box template was 230 pixels. | |||
* ''width'' - The width of the box. Can be specified as a fixed number of pixels or a percentage. | |||
===Code=== | |||
<pre class="wrap"><nowiki> | <pre class="wrap"><nowiki> | ||
{{Scroll_box|content= | {{Scroll_box|content= | ||
| Line 8: | Line 24: | ||
</nowiki></pre> | </nowiki></pre> | ||
<pre class="wrap"><nowiki> | <pre class="wrap"><nowiki> | ||
{{Scroll_box|height=300px|content= | {{Scroll_box|height=300px|content= | ||
| Line 24: | Line 39: | ||
</nowiki></pre> | </nowiki></pre> | ||
== | ==Examples== | ||
===Code=== | ===Code=== | ||
<pre class="wrap"><nowiki> | <pre class="wrap"><nowiki> | ||
| Line 96: | Line 111: | ||
===Alternative code=== | ===Alternative code=== | ||
If no width or height are defined, the content= variable | If no width or height are defined, the content= variable can be unnamed. | ||
<pre class="wrap"><nowiki> | <pre class="wrap"><nowiki> | ||
{{Scroll_box| | {{Scroll_box| | ||
| Line 164: | Line 179: | ||
*blah | *blah | ||
*blah | *blah | ||
}}</noinclude> | }} | ||
[[Category:Layout templates]] | |||
</noinclude> | |||
Latest revision as of 05:44, 27 March 2022
Description
[edit]Creates a scrollable box of text.
Usage
[edit]Parameters
[edit]Required
[edit]- content - The text to show in the box. If no height and width are specified, this can be passed as an unnamed variable instead.
Optional
[edit]- height - The height of the box. Can be specified as a fixed number of pixels or a percentage. Defaults to 400 pixels, the former scroll box template was 230 pixels.
- width - The width of the box. Can be specified as a fixed number of pixels or a percentage.
Code
[edit]{{Scroll_box|content=
}}
{{Scroll_box|height=300px|content=
}}
{{Scroll_box|width=100%|content=
}}
{{Scroll_box|height=230px|width=100%|content=
}}
Examples
[edit]Code
[edit]{{Scroll_box|content=
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
}}
Result
[edit]
|
Alternative code
[edit]If no width or height are defined, the content= variable can be unnamed.
{{Scroll_box|
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
*blah
}}
Result
[edit]
|

