Template:CWbox
Appearance
Uses Template:CWbox/styles.css
The template is used to display a box of a specific color and width. The color can be given as a code (r for red, b for blueâĶ), as a named color (lightgray, purpleâĶ), or as a hex color #000âŊââŊ#fff. The width is measured in units of em, and when not specified, 2âŊem is assumed. Parameter tc sets the text color (w for white, b for black, or any named/hex color).
Usage
[edit]Syntax:
{{CWbox|text|width|color}}
or
{{CWbox|text|width|c= |tc= |styles= }}
|c= is for background color, |tc= is for text color
- Color codes
- T {{CWbox|T|4|r}}
- T {{CWbox|T|4|g}}
- T {{CWbox|T|4|b}}
- T {{CWbox|T|4|y}}
- T {{CWbox|T|4|o}}
- T {{CWbox|T|4|v}}
- Arbitrary box color, text color
- txt {{CWbox|txt|4|#7bb|tc=w}}
- Gradients
- r6r5r4r3r2r1
- b6b5b4b3b2b1
- g6g5g4g3g2g1
- Missing parameters
- Â {{CWbox|3=crimson}}
- Â {{CWbox|c=crimson}}
- Â {{CWbox|2=4|c=turquoise}}
- Any additional CSS styles
- txt {{CWbox|txt|4|g2|styles=border:1px solid red;border-radius:0 0 0.5em 0;text-align:left;}}
- Primitive horizontal bar chart
| One | 834 |
| Two ones | 357 |
| Three | 15 |