memory alpha
Template documentation ()

Basic usage

{{box|''Contents''}}

produces:

Contents

Parameters

Special parameters
Parameter Description Values
|type= The type of box
black
,
white
or
transparent
|span= Uses span tags instead of div tags yes
|wide= Set the box to be as wide as the page/table
yes
|inline= Set the box to be inline text text text
yes
text text text
|header= Adds an optional header
Header
Text
|shadow= Add a shadow to the box
yes
CSS parameters
Parameter Description Default CSS
"content" The contents of the box (Necessary)
opt1
 |background=
opt2
 |color=
The color of the background of the box White background-color
|align= The alignment of the box (left, center, right) (Recommended) left float
|padding= The inner padding of the border 3px padding
|style= The style of the border Solid border-style
|border color= The color of the border Black border-color
|border size= The size of the border 3px border-width
|text align= The alignment of the text (Recommended) left text-align
|spacing= The spacing of the letters letter-spacing
|font= The font of the box's text font-family
|font size= The font size of the box's text font-size
|text color= The color of the text black text-color
|margin= The outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin
|box type= The type of box (inline, inline-block, block) inline-block display
|height= The height of the box height
|width= The width of the box (The width of the text) width
|CSS= Any Additional CSS you want to add

(make sure to add ; to end)

Other CSS parameters
Parameter Description Default CSS
|top margin= The top outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-top
|bottom margin= The bottom outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-bottom
|left margin= The left outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-left
|right margin= The right outer margin of the box (Only does horizontal when type isn't inline-block or block) 3px margin-right
|top padding= The top inner padding of the border 3px padding-top
|bottom padding= The bottom inner padding of the border 3px padding-bottom
|left padding= The left inner padding of the border 3px padding-left
|right padding= The right inner padding of the border 3px padding-right
|radius= Border radius 0 border-radius
|max-height= The maximum height of the box max-height
|min-height= The minimum height of the box min-height
|max-width= The maximum width of the box max-width
|min-width= The minimum width of the box min-width

Examples

Template:Lorem

A
B

Template:Lorem

C

Template:Lorem

{{box|A|background=red|text color=white}}
{{box|B|background=blue|text color=orange}}
{{box|C|background=black|text color=white|margin=0px|height=1em|width=40px|border color=yellow}}

DOG
{{box|spacing=5px|height=50px|DOG}}

The quick brown fox jumps over the lazy dog
{{box|background=yellow|align=center|border size=10px|radius=20px|text align=center|The quick brown fox jumps over the lazy dog}}

TemplateData

This is the TemplateData for this template used by the VisualEditor and other tools.

This template produces a variety of boxes from preset options and from CSS.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Contents1

The contents of the box

Example
Hello, world!
Linesuggested
Headingheader

A heading for the box

Example
Warning
Linesuggested
Alignalign

The alignment of the box

Suggested values
left center right
Default
left
Example
center
Linesuggested
Box typebox type

The type of box (block, inline-block, or inline)

Suggested values
block inline-block inline
Example
block
Auto value
inline-block
Lineoptional
Widewide

If set to yes the box will be wide

Default
no
Example
yes
Auto value
Booleanoptional
Inlineinline

Set to yes for the box type to be inline

Default
no
Example
yes
Booleanoptional
Border stylestyle

The style of the border

Default
solid
Lineoptional
Paddingpadding

The padding of the box

Default
3px
Lineoptional
Top paddingtop padding

The top padding of the box

Lineoptional
Bottom paddingbottom padding

The bottom padding of the box

Lineoptional
Left paddingleft padding

The left padding of the box

Lineoptional
Right paddingright padding

The right padding of the box

Lineoptional
Border colorborder color

The color of the box border

Default
black
Example
red
Lineoptional
Radiusradius

Border corner radius

Default
0
Example
5em
Lineoptional
Typetype

The type of box (black, white, or transparent)

Suggested values
black white transparent
Example
black
Lineoptional
Border widthborder size

The size of the border

Default
3px
Lineoptional
Background colorcolor background

The color of background

Default
white
Example
black
Lineoptional
Text colortext color

The color of the text

Default
black
Example
green
Lineoptional
Text aligntext align

The alignment of the text

Suggested values
left center right
Default
left
Example
center
Lineoptional
Letter spacingspacing

The spacing of the letters

Lineoptional
Fontfont

The font of the text

Lineoptional
Font sizefont size text size

The size of the text

Lineoptional
Marginmargin

The size of the box's margin

Default
3px
Example
30px
Lineoptional
Top margintop margin

The size of the box's top margin

Lineoptional
Bottom marginbottom margin

The size of the box's bottom margin

Lineoptional
Left marginleft margin

The size of the box's left margin

Lineoptional
Right marginright margin

The size of the box's right margin

Lineoptional
Heightheight

The height of the box

Default
''the height of the contents plus the margin''
Example
400px
Lineoptional
Maximum heightmax-height

The maximum height of the box

Example
800px
Lineoptional
Minimum heightmin-height

The minimum height of the box

Example
100px
Lineoptional
Widthwidth

The width of the box

Default
''the width of the text plus the margin or padding''
Lineoptional
Maximum widthmax-width

The maximum width of the box

Lineoptional
Minimum widthmin-width

The minimum width of the box

Lineoptional
Other stylesCSS

Any additional CSS to use

Lineoptional

Tracking category

See also