Difference between revisions of "Template:Border/doc"
Jump to navigation
Jump to search
imported>WOSlinker (fix tag) |
imported>Vanisaac m (→See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
||
(2 intermediate revisions by 2 users not shown) | |||
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 the <code><nowiki>|border</nowiki></code> parameter in <code><nowiki>[[ | + | 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 == | ||
===Basic=== | ===Basic=== | ||
Basic usage is <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.--> | Basic usage is <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.--> | ||
− | : <code><nowiki>{{border|Abc}}</nowiki><code> → {{border|Abc}} | + | : <code><nowiki>{{border|Abc}}</nowiki></code> → {{border|Abc}} |
All options show: | All options show: | ||
Line 36: | Line 37: | ||
* {{tl|legend inline}} | * {{tl|legend inline}} | ||
− | <includeonly> | + | <includeonly>{{Sandbox other|| |
<!--Categories--> | <!--Categories--> | ||
[[Category:Text color templates]] | [[Category:Text color templates]] | ||
− | </includeonly> | + | }}</includeonly> |
Latest revision as of 00:13, 24 April 2020
![]() | 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
Basic usage is {{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 show:
{{border |element |display=display |width=width |style=style |style2=2nd style |color=color |lh=line height}}
{{border |Abc|width=2px|style=dotted |color=red}}
→ Abc
Parameters
- element
- (required) The element (image, text, etc) around which the border is to appear.
- display The element's display method
- inline-block (default if the parameter is not used), block, inline, table, flex, etc.
- 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.
- style2
- Additional CSS properties can be used in this template.
- color
- The border's color (default #ddd, otherwise recommend a named color).
Inline of element
- noinline
- Set
|noinline=<anytext>
to replace the defaultinline-block
display style. - Some text Abc
- Inline reading Abc
See also
- {{color box}}
- {{legend inline}}