Difference between revisions of "Template:Border/doc"
Jump to navigation
Jump to search
imported>Great Brightstar |
imported>Great Brightstar (→Basic) |
||
| Line 10: | Line 10: | ||
All options show: | All options show: | ||
| − | : <code><nowiki>{{border |</nowiki>''element'' | + | : <code><nowiki>{{border |</nowiki>''element'' |display=''display'' |width=''width'' |style=''style'' |style2=''style2'' |color=''color'' |lh=''line height''}}</code> |
: <code><nowiki>{{border |Abc|width=2px|style=dotted |color=red}}</nowiki></code> → {{border |Abc|width=2px|style=dotted |color=red}} | : <code><nowiki>{{border |Abc|width=2px|style=dotted |color=red}}</nowiki></code> → {{border |Abc|width=2px|style=dotted |color=red}} | ||
| Line 16: | Line 16: | ||
====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'' | + | ; ''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 <code>1px</code>). | ; ''width'': The width (thickness) of the border (default is <code>1px</code>). | ||
; ''style'' The border's style: ''solid'' (default if the parameter is not used), ''dotted'', ''dashed'', ''double'', ''groove'', ''ridge'', ''inset'' or ''outset''. | ; ''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 to this template. | ||
; ''color'': The border's color (default #ddd, otherwise recommend a [[Web colors#X11 color names|named color]]). | ; ''color'': The border's color (default #ddd, otherwise recommend a [[Web colors#X11 color names|named color]]). | ||
| − | =====Inline of | + | =====Inline of element===== |
| − | ; ''noinline'': Set {{para|noinline|<anytext>}} to | + | ; ''noinline'': Set {{para|noinline|<anytext>}} to replace the default <code>inline-block</code> display style. |
:Some text {{border |Abc|width=2px|style=dotted|noinline=indeed}} | :Some text {{border |Abc|width=2px|style=dotted|noinline=indeed}} | ||
:Inline reading {{border |Abc|width=2px|style=dotted}} | :Inline reading {{border |Abc|width=2px|style=dotted}} | ||
Revision as of 15:15, 4 November 2016
| 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=style2 |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 to this template.
- color
- The border's color (default #ddd, otherwise recommend a named color).
Inline of element
- noinline
- Set
|noinline=<anytext> to replace the default inline-block display style.
- Some text Abc
- Inline reading Abc
See also
- {{color box}}
- {{legend inline}}