Difference between revisions of "Template:Scrollbox"

m (Updating)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="border:1px solid #AAA; height:{{{height|200px}}}; margin:3px 0; overflow:auto; padding-left:0.5em; width:{{{width|99%}}}; -moz-border-radius-topleft:0.5em">
+
<includeonly>{{#if: {{NAMESPACE}} |<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}}};">
{{{1}}}
+
{{{text|{{{1}}}}}}
</div>
+
</div></td><td style="width: 8px;"></td></tr></table>|
<noinclude>
+
{{{text|{{{1}}}}}}
__NOTOC__
+
}}</includeonly><!--{{Scroll box}} end--><noinclude>
==Usage==
+
{{Documentation}}
<pre>
+
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
{{scrollbox|
+
</noinclude>
}}
 
</pre>
 
 
 
==Example==
 
<pre>
 
{{scrollbox|
 
* Lorem
 
* ipsum
 
* dolor
 
* sit
 
* amet,
 
* consectetur
 
* adipisicing
 
* elit
 
* sed
 
* do
 
* eiusmod
 
* tempor
 
* incididunt
 
* ut
 
* labore
 
* et
 
* dolore
 
* magna
 
* aliqua.
 
}}
 
</pre>
 
 
 
Will display as:
 
 
 
{{scrollbox|
 
* Lorem
 
* ipsum
 
* dolor
 
* sit
 
* amet,
 
* consectetur
 
* adipisicing
 
* elit
 
* sed
 
* do
 
* eiusmod
 
* tempor
 
* incididunt
 
* ut
 
* labore
 
* et
 
* dolore
 
* magna
 
* aliqua.
 
}}
 
 
 
==Advanced usage==
 
<nowiki>{{scrollbox}}</nowiki> has two optional parameters. You can set the height and width of the box.
 
 
 
<pre>
 
{{scrollbox|height=200px|width=50%|
 
* Lorem
 
* ipsum
 
* dolor
 
* sit
 
* amet,
 
* consectetur
 
* adipisicing
 
* elit
 
* sed
 
* do
 
* eiusmod
 
* tempor
 
* incididunt
 
* ut
 
* labore
 
* et
 
* dolore
 
* magna
 
* aliqua.
 
}}
 
</pre>
 
 
 
Will display as:
 
{{scrollbox
 
|height=200px
 
|width=50%|
 
* Lorem
 
* ipsum
 
* dolor
 
* sit
 
* amet,
 
* consectetur
 
* adipisicing
 
* elit
 
* sed
 
* do
 
* eiusmod
 
* tempor
 
* incididunt
 
* ut
 
* labore
 
* et
 
* dolore
 
* magna
 
* aliqua.
 
}}
 
 
 
[[Category:Utility templates|{{PAGENAME}}]]</noinclude>
 

Latest revision as of 22:31, 14 May 2023