Changes

Jump to navigation Jump to search
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Usage ==
{{box|align=center|text align=center|'''Recommended Usage: '''<code><nowiki>{{box|''Contents''}}</nowiki></code>}}

{|class="wikitable" style="width:100%;{{#if:{{{no-special|}}}|display:none;}}"
|+ Special Parameters
! style="width: 8em;|Parameter
! style="width: 16em;|Description
! Values
|-
| {{para|type}}
| The type of box
| {{box|type=black|black}}, {{box|type=white|white}} or {{box|type=transparent|transparent}}
|-
| {{para|span}}
| Uses span tags instead of div tags
| {{box|span=yes|yes}}
|-
| {{para|wide}}
| Set the box to be as wide as the page/table
| {{box|wide=yes|yes}}
|-
| {{para|inline}}
| Set the box to be inline
| text text text {{box|inline=yes|yes}} text text text
|-
| {{para|header}}
| Adds an '''optional''' header
| {{box|header=Header|Text}}
|-
|}

{| class="wikitable" style="width: 100%;
|+ Supported Parameters
! style="width: 8em;|Parameter
! Description
! Default
! CSS
|-
|
| The contents of the box ('''Highly Recommend''')
|
|
|-
| {{para|background}}/{{para|color}}
| The color of the background of the box
| White
| background-color
|-
| {{para|align}}
| The alignment of the box (left, center, right) ('''Recommended''')
| left
| float
|-
| {{para|padding}}
| The inner padding of the border
| 3px
| padding
|-
| {{para|style}}
| The style of the border
| Solid
| border-style
|-
| {{para|border color}}
| The color of the border
| Black
| background-color
|-
| {{para|border size}}
| The size of the border
| 3px
| border-width
|-
| {{para|text align}}
| The alignment of the text ('''Recommended''')
| left
| text-align
|-
| {{para|spacing}}
| The spacing of the letters
|
| letter-spacing
|-
| {{para|font}}
|The font of the box's text
|
|font-family
|-
|{{para|font size}}
|The font size of the box's text
|
|font-size
|-
|{{para|text color}}
|The color of the text
|black
|text-color
|-
|{{para|margin}}
|The outer margin of the box (Only does horizontal when type isn't <code>inline-block</code> or <code>block</code>)
|3px
|margin
|-
|{{para|box type}}
|The type of box (inline, inline-block, block)
|inline-block
|display
|-
|{{para|height}}
|The height of the box
|
|height
|-
|{{para|width}}
|The width of the box
|(The width of the text)
|width
|-
|{{para|CSS}}
|Any Additional CSS you want to add
('''make sure to add ; to end''')
|
|
|}

{| class="wikitable" style="width: 100%;
|+ Other Parameters
! style="width: 8em;|Parameter
! Description
! Default
! CSS
|-
|{{para|top margin}}
|The top outer margin of the box (Only does horizontal when type isn't <code>inline-block</code> or <code>block</code>)
|3px
|margin-top
|-
|{{para|bottom margin}}
|The bottom outer margin of the box (Only does horizontal when type isn't <code>inline-block</code> or <code>block</code>)
|3px
|margin-bottom
|-
|{{para|left margin}}
|The left outer margin of the box (Only does horizontal when type isn't <code>inline-block</code> or <code>block</code>)
|3px
|margin-left
|-
|{{para|right margin}}
|The right outer margin of the box (Only does horizontal when type isn't <code>inline-block</code> or <code>block</code>)
|3px
|margin-right
|-
|{{para|top padding}}
|The top inner padding of the border
|3px
|padding-top
|-
|{{para|bottom padding}}
|The bottom inner padding of the border
|3px
|padding-bottom
|-
|{{para|left padding}}
|The left inner padding of the border
|3px
|padding-left
|-
|{{para|right padding}}
|The right inner padding of the border
|3px
|padding-right
|}

==Examples==
{{lorem}}{{box|A|background=red|text color=white}}{{box|B|background=blue|text color=orange}}{{lorem|2}}{{box|C|background=black|text color=white|margin=0px|height=1em|width=40px|border color=yellow}}{{lorem}}
{{clear}}
<pre>{{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}}
</pre>
{{clear}}
----
{{box|spacing=5px|height=50px|DOG}}
{{clear}}
<pre>{{box|spacing=5px|height=50px|DOG}}</pre>
{{clear}}
----
{{box|background=yellow|align=center|border size=10px|text align=center|The quick brown fox jumps over the lazy dog}}
{{clear}}
<pre>{{box|background=yellow|align=center|border size=10px|text align=center|The quick brown fox jumps over the lazy dog}}</pre>

== Data ==
<templatedata>
{
"params": {
"1": {
"description": "The contents of the box",
"example": "Hello, world!",
"suggested": true
},
"header": {
"description": "A heading for the box",
"example": "Warning",
"suggested": true
},
"align": {
"description": "The alignment of the box",
"example": "center",
"default": "left",
"suggested": true
},
"box type": {
"description": "The type of box (css display) (block,inline-block or inline)",
"example": "block",
"autovalue": "inline-block"
},
"wide": {
"description": "If set to yes the box will be wide",
"example": "yes",
"type": "boolean",
"default": "no",
"autovalue": ""
},
"inline": {
"description": "Set to yes for the box type to be inline",
"example": "yes",
"type": "boolean",
"default": "no"
},
"style": {
"description": "The style of the border",
"default": "solid"
},
"padding": {
"description": "The padding of the box",
"default": "3px"
},
"top padding": {
"description": "The top padding of the box"
},
"bottom padding": {
"description": "Thebottom padding of the box"
},
"left padding": {
"description": "The left padding of the box"
},
"right padding": {
"description": "The right padding of the box"
},
"border color": {
"description": "The color of the box border",
"example": "red",
"type": "string",
"default": "black"
},
"type": {
"description": "The type of box (black,white,transparent)",
"example": "black"
},
"border size": {
"description": "The size of the border",
"default": "3px"
},
"color": {
"aliases": [
"background"
],
"description": "The color of background",
"example": "black",
"default": "white"
},
"text color": {
"description": "The color of the text",
"example": "green",
"default": "black"
},
"text align": {
"description": "The alignment of the text (css text-align)",
"example": "center",
"default": "left"
},
"spacing": {
"description": "The spacing of the letters"
},
"font": {
"description": "The font of the text"
},
"font size": {
"aliases": [
"text size"
],
"description": "The size of the text"
},
"margin": {
"description": "The size of the box's margin",
"example": "30px",
"default": "3px"
},
"top margin": {
"description": "The size of the box's top margin"
},
"bottom margin": {
"description": "The size of the box's bottom margin"
},
"left margin": {
"description": "The size of the box's left margin"
},
"right margin": {
"description": "The size of the box's right margin"
},
"height": {
"description": "The height of the box",
"example": "400px",
"default": "''the height of the contents plus the margin''"
},
"width": {
"description": "The width of the box",
"default": "''the width of the text plus the margin''"
},
"CSS": {
"description": "Any additional CSS to use"
},
},
"description": "This template produces a variety of boxes from preset options and from CSS.",
"format": "inline"
}
</templatedata>

==Tracking categories==
* [[:Category:Pages using box with unknown parameters]]
* [[:Category:Pages using box-r with unknown parameters]]

==See also==

*{{tl|Divbox}}
*{{tl|sidebar box}}

<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Box templates|!]]
}}</includeonly>
Anonymous user

Navigation menu