From Iron Chariots Wiki
(Difference between revisions)
Jump to: navigation, search
(encapsulate /doc)
(Rounded corners also in Safari)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="align: center; width: {{{width|auto}}}; background: {{{bg|#FFF7D2}}}; color: {{{tcolor| }}}; padding: 0 .5em 0 1em; margin: .5em {{{rmargin|1em}}} 1em {{{lmargin|1em}}}; border: {{{border|1px solid #777}}}">
<div style=" -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; align: center; width: {{{width|auto}}}; background: {{{bg|#FFF7D2}}}; color: {{{tcolor|#000 }}}; padding: 0 .5em 0 1em; margin: .5em {{{rmargin|1em}}} 1em {{{lmargin|1em}}}; border: {{{border|1px solid #aa7}}}">
'''{{{label| }}}''' {{{text}}}
[[Category:Informational templates|Comment-box1]]
[[Category:Informational templates|Comment-box1]]

Latest revision as of 20:44, 7 September 2009


The documentation for this template is transcluded from Template:Comment-box1/doc. Please edit that page if you want to change something in the documentation. Do not edit this page unless you know what you're doing.
To provide consistent formatting of comment boxes in articles (or other types of pages, as necessary).
  • The named parameter text is required; its value, Text, is the text that will be displayed in the box. Text can contain line breaks (newlines) and wiki formatting.
  • The named parameter label is optional; its value, if present, will appear in bold type immediately before the comment text (include a trailing colon in Label if you want to see one).
  • The additional optional parameters control different CSS style attributes. Note that colors may be specified by a hex triplet (e.g., #FFDDCC or #fdc for short — the differences in capitalization are not meaningful), an RGB triplet (e.g., RGB(255,221,204)), or a valid color name (e.g., salmon — not quite the same color as the previous two mentioned in this note). See Wikipedia:Web colors for help with specifying colors. Lengths and widths can be specified using relative units such as em ("M" width) or % (percent), or absolute units such as px (pixels). When specifying a zero length or width, use 0 with no units.
  • The optional parameters include:
    Width of the box. Please use relative units (see note above). The special value auto (which is the default) will make the box only as wide as it needs to be.
    Border properties. Generally this consists of a space-separated list of line width, line type, and line color. The default is 1px solid #777.
    Properties of the background (behind the visible text). Usually this only specifies the color, although other options are available. The default is #FFF7D2.
    Text color. The default is #000.
    Right margin (space between text and right border of box). Please use relative units (see note above). The default is 1em.
    Left margin (space between text and left border). Please use relative units (see note above). The default is 1em.
  • {{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.}}

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

  • {{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
wiki navigation