Template:Comment-box1

(Difference between revisions)
Jump to: navigation, search
(remove extraneous vertical space (shows up in articles) and nowiki's)
Line 1: Line 1:
 
<div style="align: center; width: {{{width|auto}}}; background: {{{bg|#FFF7D2}}}; color: {{{tcolor| }}}; padding: 0 0 0 1em; margin: .5em {{{rmargin|1em}}} 1em {{{lmargin|1em}}}; border: {{{border|1px solid #777}}}">
 
<div style="align: center; width: {{{width|auto}}}; background: {{{bg|#FFF7D2}}}; color: {{{tcolor| }}}; padding: 0 0 0 1em; margin: .5em {{{rmargin|1em}}} 1em {{{lmargin|1em}}}; border: {{{border|1px solid #777}}}">
 
'''{{{label| }}}''' {{{text}}}
 
'''{{{label| }}}''' {{{text}}}
</div>
+
</div><noinclude>
 
+
<noinclude>
+
 
<br style="clear:both" />
 
<br style="clear:both" />
 
==Usage==
 
==Usage==
<nowiki>{{</nowiki>Comment-box1|'''width'''=''setting''(optional)|'''bg'''=''color''(optional)|'''tcolor'''=''color''(optional)|'''rmargin'''=''xx''(optional)|'''lmargin'''=''xx''(optional)|'''border'''=''xx''(optional)|'''label'''=''label''(optional)|'''text'''=Sample text...('''required''')<nowiki>}}</nowiki>
+
<nowiki>{{</nowiki>Comment-box1|'''width'''=''setting''(optional)|'''bg'''=''color''(optional)|'''tcolor'''=''color''(optional)|'''rmargin'''=''xx''(optional)|'''lmargin'''=''xx''(optional)|'''border'''=''xx''(optional)|'''label'''=''label''(optional)|'''text'''=Sample text...('''required''')}}
 
{{Comment-box1|bg=darkred|tcolor=white|border=3px solid black|label=WARNING:|text=Setting incompatible values for '''width''' and '''rmargin/lmargin''' may have unexpected results. '''Preview''' pages before saving.}}
 
{{Comment-box1|bg=darkred|tcolor=white|border=3px solid black|label=WARNING:|text=Setting incompatible values for '''width''' and '''rmargin/lmargin''' may have unexpected results. '''Preview''' pages before saving.}}
 
==Parameters==
 
==Parameters==
 
===Optional===
 
===Optional===
 
'''width''' &rarr; Sets width of box. Accepts any valid CSS width value
 
'''width''' &rarr; Sets width of box. Accepts any valid CSS width value
:<nowiki>[</nowiki>Numerical values with 'px' or 'em' designators or auto(default).<nowiki>]</nowiki>
+
:[Numerical values with 'px' or 'em' designators or auto(default).]
 
'''bg''' &rarr; Sets background color of box. Accepts any valid CSS background value
 
'''bg''' &rarr; Sets background color of box. Accepts any valid CSS background value
:<nowiki>[</nowiki>Hexadecimal values (preceded by #, as in '''#FAF''' or '''#E3F6A1'''), RGB values (formatted as RGB(x,x,x), as in '''RGB(128,5,112)''') or color names (as in '''red''' or '''lightgreen''').<nowiki>]</nowiki>
+
:[Hexadecimal values (preceded by #, as in '''#FAF''' or '''#E3F6A1'''), RGB values (formatted as RGB(x,x,x), as in '''RGB(128,5,112)''') or color names (as in '''red''' or '''lightgreen''').]
 
'''tcolor''' &rarr; Sets text color of content. Accepts any valid CSS background value
 
'''tcolor''' &rarr; Sets text color of content. Accepts any valid CSS background value
:<nowiki>[</nowiki>Hexadecimal values (preceded by #, as in '''#FAF''' or '''#E3F6A1'''), RGB values (formatted as RGB(x,x,x), as in '''RGB(128,5,112)''') or color names (as in '''red''' or '''lightgreen''').<nowiki>]</nowiki>
+
:[Hexadecimal values (preceded by #, as in '''#FAF''' or '''#E3F6A1'''), RGB values (formatted as RGB(x,x,x), as in '''RGB(128,5,112)''') or color names (as in '''red''' or '''lightgreen''').]
 
'''rmargin''' &rarr; Sets right margin. Accepts any valid CSS margin value
 
'''rmargin''' &rarr; Sets right margin. Accepts any valid CSS margin value
:<nowiki>[</nowiki>Numerical values with 'px' or 'em' designators or 0 (default is 1em).<nowiki>]</nowiki>
+
:[Numerical values with 'px' or 'em' designators or 0 (default is 1em).]
 
'''lmargin''' &rarr; Sets left margin Accepts any valid CSS margin value
 
'''lmargin''' &rarr; Sets left margin Accepts any valid CSS margin value
:<nowiki>[</nowiki>Numerical values with 'px' or 'em' designators or 0 (default is 1em).<nowiki>]</nowiki>
+
:[Numerical values with 'px' or 'em' designators or 0 (default is 1em).]
 
'''border''' &rarr; Defines border attributes. Accepts any valid CSS border description
 
'''border''' &rarr; Defines border attributes. Accepts any valid CSS border description
:<nowiki>[</nowiki>Descriptions as '''1px solid #777''' or '''dashed'''<nowiki>]</nowiki>
+
:[Descriptions as '''1px solid #777''' or '''dashed''']
 
'''label''' &rarr; Sets the label (if any). This label precedes the text and appears in bold
 
'''label''' &rarr; Sets the label (if any). This label precedes the text and appears in bold
 
===Required===
 
===Required===

Revision as of 12:51, 18 April 2007

{{{text}}}


Contents

Usage

{{Comment-box1|width=setting(optional)|bg=color(optional)|tcolor=color(optional)|rmargin=xx(optional)|lmargin=xx(optional)|border=xx(optional)|label=label(optional)|text=Sample text...(required)}}

WARNING: Setting incompatible values for width and rmargin/lmargin may have unexpected results. Preview pages before saving.

Parameters

Optional

width → Sets width of box. Accepts any valid CSS width value

[Numerical values with 'px' or 'em' designators or auto(default).]

bg → Sets background color of box. Accepts any valid CSS background value

[Hexadecimal values (preceded by #, as in #FAF or #E3F6A1), RGB values (formatted as RGB(x,x,x), as in RGB(128,5,112)) or color names (as in red or lightgreen).]

tcolor → Sets text color of content. Accepts any valid CSS background value

[Hexadecimal values (preceded by #, as in #FAF or #E3F6A1), RGB values (formatted as RGB(x,x,x), as in RGB(128,5,112)) or color names (as in red or lightgreen).]

rmargin → Sets right margin. Accepts any valid CSS margin value

[Numerical values with 'px' or 'em' designators or 0 (default is 1em).]

lmargin → Sets left margin Accepts any valid CSS margin value

[Numerical values with 'px' or 'em' designators or 0 (default is 1em).]

border → Defines border attributes. Accepts any valid CSS border description

[Descriptions as 1px solid #777 or dashed]

label → Sets the label (if any). This label precedes the text and appears in bold

Required

text → The content to be displayed.

Samples

  • {{Comment-box1|width=75%|bg=lightgreen|label=Comment:|text=Here's some sample text.}} yields:

Comment: Here's some sample text.

  • {{Comment-box1|rmargin=200px|lmargin=75px|label=Message:|text=Here's some sample text.}} yields:

Message: Here's some sample text.

  • {{Comment-box1|width=300px|bg=rgb(188,206,188)|border=5px dotted #3333E4|text=Here's some sample text.|label=Recipe:}} yields:

Recipe: Here's some sample text.

  • {{Comment-box1|bg=#DDF|text=Here's some sample text.}} yields:

Here's some sample text.

  • {{Comment-box1|bg=#000|tcolor=#FFF|text=Here's '''some''' sample ''text'', with formatting.}} yields:

Here's some sample text, with formatting.

Personal tools
Namespaces
Variants
Actions
wiki navigation
IronChariots.Org
Toolbox