Difference between revisions of "Template:Txtbox"

From PC-BSD Wiki
Jump to: navigation, search
Line 7: Line 7:
 
{{{1|}}}
 
{{{1|}}}
 
|}</includeonly><noinclude>
 
|}</includeonly><noinclude>
{|align="center" cellspacing="0" cellpadding="1" style="border:none; width:98%; border-collapse: collapse;"
+
== Explanation ==
|style=" border: #aaaaaa dashed 1px; text-align:left; padding-left: .7em; padding-right: .4em; padding-top: .4em; padding-bottom: .4em;"|
+
This template encloses the provided text within a dashed line box. The text to the right of the box may be some type of comment such as ''"a prompt asking for the root password will open."'' By assigning width it can be adjusted if necessary, otherwise the content to the right of the box defaults to a width of 60% out of the 98% used. Note that formatting is needed (such as <nowiki><br></nowiki>) to prevent the content from becoming one long line or paragraph (the <nowiki><</nowiki>nowiki> or 'leading space' formatting tricks do not work). Other style markup like for ''italic'' or '''bold''' should be placed directly around the content and not around the entire template.
A much improved variation of that above 'standard' also encloses the text within a similar box. Even though the text is a short paragraph of four sentences in length, it does not have the same flaw as before. The text is neatly contained within the dashed lines of the box, and also does not require the initial space character at the start of the first sentence. If that character were included, it would display with two nested boxes.
+
 
|style="border:none; text-align:left; width:60%"|
+
== Usage ==
|}</noinclude>
+
'''<nowiki>{{</nowiki>txtbox|box='''<br>
 +
''content''<nowiki><br></nowiki><br>
 +
<nowiki>'''</nowiki>''second line'' - note that bold and italic<nowiki>'''</nowiki><br>
 +
'''|'''<br>
 +
''Text to right of box''<br>
 +
<nowiki>''</nowiki>''second line'' - are used as examples<nowiki>''</nowiki><nowiki><br></nowiki><br>
 +
'''|'''<br>
 +
'''''width='''value''<br>
 +
'''}}'''
 +
 
 +
== Example ==
 +
{{txtbox|box=
 +
content<br>
 +
'''second line''' - note that bold and italic
 +
|
 +
Text to right of box<br>
 +
''second line'' - are used as examples
 +
}}
 +
</noinclude>

Revision as of 20:26, 1 November 2012

Explanation

This template encloses the provided text within a dashed line box. The text to the right of the box may be some type of comment such as "a prompt asking for the root password will open." By assigning width it can be adjusted if necessary, otherwise the content to the right of the box defaults to a width of 60% out of the 98% used. Note that formatting is needed (such as <br>) to prevent the content from becoming one long line or paragraph (the <nowiki> or 'leading space' formatting tricks do not work). Other style markup like for italic or bold should be placed directly around the content and not around the entire template.

Usage

{{txtbox|box=
content<br>
'''second line - note that bold and italic'''
|
Text to right of box
''second line - are used as examples''<br>
|
width=value
}}

Example

content
second line - note that bold and italic
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox