Template: Edit

Editing Template:Scrollbox/doc

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Documentation subpage}}
+
==Usage==
== Description ==
+
<pre>
This scrolling list 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.
+
{{scrollbox|
 
 
== Usage ==
 
<div style="border: 1px #ccc solid; padding:1em;">
 
<code>
 
'''&#123;&#123;scroll box'''<br />
 
'''|width='''''<span style="color:blue">width (in pixel or in percent)</span>''<br />
 
'''|height='''''<span style="color:blue">height (in pixel)</span>''<br />
 
'''|text='''''<span style="color:green">contents</span>''<br />
 
'''&#125;&#125;'''
 
</code>
 
</div>
 
 
 
The colored text should be properly replaced as here described:
 
 
 
<span style="color:blue">width</span>
 
:The width of the box, expressed in pixel or in percent. ('''default=100%''')
 
<span style="color:blue">height</span>
 
:The height of the box, you should express this value exclusively in pixel. ('''default=230px''')
 
<span style="color:green">contents</span>
 
: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)
 
 
 
== Examples ==
 
=== Example 1 (Simple) ===
 
==== Code ====
 
<pre><nowiki>
 
{{scroll box|
 
* Example 01
 
* Example 02
 
* Example 03
 
* Example 04
 
* Example 05
 
* Example 06
 
* Example 07
 
* Example 08
 
* Example 09
 
* Example 10
 
* Example 11
 
* Example 12
 
* Example 13
 
* Example 14
 
* Example 15
 
 
}}
 
}}
</nowiki></pre>
+
</pre>
  
==== Result ====
+
==Example==
Some text:
+
<pre>
{{scroll box|
+
{{scrollbox|
* Example 01
+
* Lorem
* Example 02
+
* ipsum
* Example 03
+
* dolor
* Example 04
+
* sit
* Example 05
+
* amet,
* Example 06
+
* consectetur
* Example 07
+
* adipisicing
* Example 08
+
* elit
* Example 09
+
* sed
* Example 10
+
* do
* Example 11
+
* eiusmod
* Example 12
+
* tempor
* Example 13
+
* incididunt
* Example 14
+
* ut
* Example 15
+
* labore
 +
* et
 +
* dolore
 +
* magna
 +
* aliqua.
 
}}
 
}}
 +
</pre>
  
=== Example 2 (With 1 param) ===
+
Will display as:
==== Code ====
 
<pre><nowiki>
 
{{scroll box|text=
 
* Example 01
 
* Example 02
 
* Example 03
 
* Example 04
 
* Example 05
 
* Example 06
 
* Example 07
 
* Example 08
 
* Example 09
 
* Example 10
 
* Example 11
 
* Example 12
 
* Example 13
 
* Example 14
 
* Example 15
 
}}
 
</nowiki></pre>
 
==== Result ====
 
{{scroll box|text=
 
* Example 01
 
* Example 02
 
* Example 03
 
* Example 04
 
* Example 05
 
* Example 06
 
* Example 07
 
* Example 08
 
* Example 09
 
* Example 10
 
* Example 11
 
* Example 12
 
* Example 13
 
* Example 14
 
* Example 15
 
}}
 
  
=== Example 3 (width) ===
+
{{scrollbox|
==== Code ====
+
* Lorem
<pre><nowiki>
+
* ipsum
{{scroll box|width=75%|text=
+
* dolor
* Example 01
+
* sit
* Example 02
+
* amet,
* Example 03
+
* consectetur
* Example 04
+
* adipisicing
* Example 05
+
* elit
* Example 06
+
* sed
* Example 07
+
* do
* Example 08
+
* eiusmod
* Example 09
+
* tempor
* Example 10
+
* incididunt
* Example 11
+
* ut
* Example 12
+
* labore
* Example 13
+
* et
* Example 14
+
* dolore
* Example 15
+
* magna
 +
* aliqua.
 
}}
 
}}
</nowiki></pre>
 
  
==== Result ====
+
==Advanced usage==
{{scroll box|width=75%|text=
+
<nowiki>{{scrollbox}}</nowiki> has two optional parameters. You can set the height and width of the box.
* Example 01
 
* Example 02
 
* Example 03
 
* Example 04
 
* Example 05
 
* Example 06
 
* Example 07
 
* Example 08
 
* Example 09
 
* Example 10
 
* Example 11
 
* Example 12
 
* Example 13
 
* Example 14
 
* Example 15
 
}}
 
  
=== Example 4 (width and height) ===
+
<pre>
==== Code ====
+
{{scrollbox|height=200px|width=50%|
<pre><nowiki>
+
* Lorem
{{scroll box|width=150px|height=100px|bar=invisible|text=
+
* ipsum
* Example 01
+
* dolor
* Example 02
+
* sit
* Example 03
+
* amet,
* Example 04
+
* consectetur
* Example 05
+
* adipisicing
* Example 06
+
* elit
* Example 07
+
* sed
* Example 08
+
* do
* Example 09
+
* eiusmod
* Example 10
+
* tempor
* Example 11
+
* incididunt
* Example 12
+
* ut
* Example 13
+
* labore
* Example 14
+
* et
* Example 15
+
* dolore
 +
* magna
 +
* aliqua.
 
}}
 
}}
</nowiki></pre>
+
</pre>
  
==== Result ====
+
Will display as:
{{scroll box|width=150px|height=100px|text=
+
{{scrollbox
* Example 01
+
|height=200px
* Example 02
+
|width=50%|
* Example 03
+
* Lorem
* Example 04
+
* ipsum
* Example 05
+
* dolor
* Example 06
+
* sit
* Example 07
+
* amet,
* Example 08
+
* consectetur
* Example 09
+
* adipisicing
* Example 10
+
* elit
* Example 11
+
* sed
* Example 12
+
* do
* Example 13
+
* eiusmod
* Example 14
+
* tempor
* Example 15
+
* incididunt
 +
* ut
 +
* labore
 +
* et
 +
* dolore
 +
* magna
 +
* aliqua.
 
}}
 
}}
  
<includeonly>{{Sandbox other|
+
[[Category:Utility templates|{{PAGENAME}}]]
| <!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
 
[[Category:Box templates]]
 
}}</includeonly>
 

Please note that all contributions to BattleTechWiki are considered to be released under the GNU FDL 1.2 (see BattleTechWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Advanced templates:

Editing: {{Merge}}   {{Moratorium}}   {{Otheruses| | | }}

Notices: {{NoEdit}}   {{Sign}}   {{Unsigned|name}}   {{Welcome}}

Administration: {{Essay}}   {{Policy}}   {{Procedure}}