Template:Box

From TransitWiki
Jump to navigation Jump to search
{{{content}}}

Usage

This is exactly the same as the {{notice}} template, but without the "headline" parameter.

The Help:Notices page has detailed help - just replace "notice" with "box" and ignore the headline. The following is a brief version.

Use this template to create one-off notices, or use to create a notice template for a specific purpose.

Example 1: for a box with square corners

{{box
|width=80%
|background-color=Wheat
|border-color=SaddleBrown
|radius=0
|content=Yabba dabba doo
}}

creates:

Yabba dabba doo


Example 2: You can also create a box with rounded corners, and/or with aligned left, e.g.:

{{box
|width=80%
|background-color=#E3E4FA
|border-color=#993399
|radius=10
|content=Join us - why not?
|align=left
}}

creates:

Join us - why not?

(If you leave out the "radius" term, it seems to default to a box with square corners, but it seems like good practice to always use the parameters, as in other cases it breaks the template.)

Alignment

Alignment is center by default, but

Choosing colors

Choose your colors from a "palette" such as the table at Wikipedia:Web colors#X11 color names.

Note that you can use hex codes for colors such as #F3F2E0, as in this example:

{{box
|width=80%
|background-color=#F3F2E0
|border-color=#B5B380
|content=Yabba dabba doo}}

See Help:Notices for more examples of colors.

See also