Difference between revisions of "Template:Border/doc"
Jump to navigation
Jump to search
imported>Frietjes |
imported>DePiep |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | ||
| − | This template is used to place a border around text. Note, to add a border to an image use <code><nowiki>|border</nowiki></code> (see [[Wikipedia:Picture tutorial#Border]]). | + | This template is used to place a border around text. Note, to add a border to an image use the <code><nowiki>|border</nowiki></code> parameter in <code><nowiki>[[:File:...]]</nowiki></code> (see [[Wikipedia:Picture tutorial#Border|Wikipedia:Picture tutorial]]). |
__NOTOC__ | __NOTOC__ | ||
== Syntax == | == Syntax == | ||
| Line 8: | Line 8: | ||
: <code><nowiki>{{border|</nowiki>''element''}}<code> | : <code><nowiki>{{border|</nowiki>''element''}}<code> | ||
: ...where ''element'' is the image, text, etc around which the border is to appear. The border will be a solid light grey color (#ddd) and 1px (1 pixel) wide (default settings; see below). <!--If applying the template appears to shift the ''element'''s position, try adding the <code>display=noinline</code> parameter described below.--> | : ...where ''element'' is the image, text, etc around which the border is to appear. The border will be a solid light grey color (#ddd) and 1px (1 pixel) wide (default settings; see below). <!--If applying the template appears to shift the ''element'''s position, try adding the <code>display=noinline</code> parameter described below.--> | ||
| + | : <code><nowiki>{{border|Abc}}</nowiki><code> → {{border|Abc}} | ||
| − | === | + | ===All options=== |
: <code><nowiki>{{border |</nowiki>''element'' <!--|display=''display''--> |width=''width'' |style=''style'' |color=''color}}</code> | : <code><nowiki>{{border |</nowiki>''element'' <!--|display=''display''--> |width=''width'' |style=''style'' |color=''color}}</code> | ||
| + | |||
| + | : <code><nowiki>{{border |Abc|width=2px|style=dotted |color=red}}</nowiki></code> → {{border |Abc|width=2px|style=dotted |color=red}} | ||
====Parameters==== | ====Parameters==== | ||
| − | ; ''element'' : (required) The element (image, text, etc) around which the border is to appear. | + | ; ''element'': (required) The element (image, text, etc) around which the border is to appear. |
<!-- | <!-- | ||
| − | ; ''display'' {{nobold|1==noinline}} : The ''element'''s position sometimes seems to be shifted due to the default inline formatting style used by this template. When this occurs, adding the parameter <code>display=noinline</code> may restore the positioning. | + | ; ''display'': {{nobold|1==noinline}} : The ''element'''s position sometimes seems to be shifted due to the default inline formatting style used by this template. When this occurs, adding the parameter <code>display=noinline</code> may restore the positioning. |
--> | --> | ||
| − | ; ''width'' | + | ; ''width'': The width (thickness) of the border (default is <code>1px</code>). |
| − | ; ''style'' | + | ; ''style'' The border's style: ''solid'' (default if the parameter is not used), ''dotted'', ''dashed'', ''double'', ''groove'', ''ridge'', ''inset'' or ''outset''. |
| − | ; ''color'' | + | ; ''color'': The border's color (default #ddd, otherwise recommend a [[Web colors#X11 color names|named color]]). |
; ''noinline'' : Set this to any value to remove the inline style. | ; ''noinline'' : Set this to any value to remove the inline style. | ||
| + | {{border |Abc|width=2px|style=dotted |inline=no}} | ||
| + | |||
== See also == | == See also == | ||
* {{tl|color box}} | * {{tl|color box}} | ||
Revision as of 14:11, 26 August 2014
| This is a documentation subpage for Template:Border. It contains usage information, categories and other content that is not part of the original template page. |
This template is used to place a border around text. Note, to add a border to an image use the |border parameter in [[:File:...]] (see Wikipedia:Picture tutorial).
Syntax
Basic
{{border|element}}- ...where element is the image, text, etc around which the border is to appear. The border will be a solid light grey color (#ddd) and 1px (1 pixel) wide (default settings; see below).
{{border|Abc}}→ Abc
All options
{{border |element |width=width |style=style |color=color}}
{{border |Abc|width=2px|style=dotted |color=red}} → Abc
Parameters
- element
- (required) The element (image, text, etc) around which the border is to appear.
- width
- The width (thickness) of the border (default is
1px).
- style The border's style
- solid (default if the parameter is not used), dotted, dashed, double, groove, ridge, inset or outset.
- color
- The border's color (default #ddd, otherwise recommend a named color).
- noinline
- Set this to any value to remove the inline style.
Abc
See also
- {{color box}}
- {{legend inline}}