Template:Scroll box: Difference between revisions
From XMBdocs
Miqrogroove (talk | contribs) (Trying to add a template from Wikipedia) |
Miqrogroove (talk | contribs) (Get rid of IF block.) |
||
Line 22: | Line 22: | ||
:The text that should be displayed inside this frame. Note that the scroll bar will appear only if the text is long enough to overflow the given height. ('''required field''', no default value) | :The text that should be displayed inside this frame. Note that the scroll bar will appear only if the text is long enough to overflow the given height. ('''required field''', no default value) | ||
</noinclude> | </noinclude> | ||
<includeonly> | <includeonly><table style="clear: both; width: {{{width|100%}}}; margin: 3px 0px;" border="0"><tr><td style="background:{{{background|transparent}}};"><div style="overflow: auto; width: 100%; height: {{{height|230px}}}; border: 1px solid #AAA; padding-left: 0.5em; background: {{{background|transparent}}};"> | ||
{{{text|{{{1}}}}}} | {{{text|{{{1}}}}}} | ||
</div></td><td style="width: 8px;"></td></tr></table> | </div></td><td style="width: 8px;"></td></tr></table></includeonly> | ||
Latest revision as of 14:04, 26 December 2017
Description
This template creates a scroll-box within a page that allows for large content to be limited to a given number of pixels on the page.
Usage
{{scroll box
|width=width (in pixel or in percent)
|height=height (in pixel)
|text=contents
}}
The colored text should be properly replaced as here described:
width
- The width of the box, expressed in pixel or in percent. (default=100%)
height
- The height of the box, you should express this value exclusively in pixel. (default=230px)
contents
- The text that should be displayed inside this frame. Note that the scroll bar will appear only if the text is long enough to overflow the given height. (required field, no default value)