Template:Scroll box: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Saix (talk | contribs)
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 instructions==
</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>


NOTE: Optional '''height''' and '''width''' variables can be used to control the width of the scroll box (height defaults to 400 pixels; the former "scroll box" template was 230 pixels):
<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>


==Example==
==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 is not required either.
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]
  • 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


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]
  • 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