Template:Box-top/doc

From Angelina Jordan Wiki
Revision as of 01:22, 24 July 2024 by Dcljr (talk | contribs) (use {tc-var}; document type=)
This is a subpage documenting Template:Box-top. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

Documentation

This template creates a box for placement at the top of a page. Note that it gives the full box, not just the top of it (i.e., unlike with some of our table-related templates, there are not separate templates for "opening" and "closing" the box). To create a box for placement at the bottom of a page, use {{box-bottom}}; for one floated to the right, use {{box-right}}.

This template is used on a great many pages. Making any changes to it will cause lots of jobs to be added to the processing queue.

Usage

  • {{box-top|content|type=|margin=|padding=|border=|border-style=|border-width=|border-color=|background-color=|width=|min-width=|max-width=|extra-style=}}

All of the named parameters are optional, but if they are present in the template call, they must be given values (not left empty). Each of them specifies the value of the same-named style attribute.

The parameter type can be used to format the border and background color based on the nature of the content being displayed. Possible values include information, notice, warning and documentation (or the shorter versions info, note, warn, and doc).

If border is used, it should specify all three aspects of the border: style, color, and width. If border is not used, then border-style, border-width, and border-color can be used to override the default aspects separately (you cannot use both border and any of the other three).

If width is not specified, then the width of the box will adjust based on how much content is being displayed, with an optional minimum possible width given by min-wdith (no default) and a maximum possible width given by max-width (which defaults to 90%).

Examples