Template:Border/doc: Difference between revisions
(t) |
m (Text replacement - " " to " ") |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> To place a border around e.g. an image. __NOTOC__ | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | |||
To place a border around e.g. an image. | |||
__NOTOC__ | |||
=== | == Syntax == | ||
=== | === Basic === | ||
====Parameters==== | :<code><nowiki>{{border|</nowiki>''element''}}<code></code></code> | ||
; ''element'' : (required) The element (image, text, etc) around which the border is to appear. | :<code><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></code> | ||
<!-- | |||
<code><code> | |||
=== Full === | |||
:<code><nowiki>{{border |</nowiki>''element'' <!--|display=''display''--> |width=''width'' |style=''style'' |color=''color}}''</code> | |||
==== Parameters ==== | |||
;''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 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 [[Web colors#X11_color_names|named color]]). | |||
; '' | ;''noinline'' | ||
:Set this to any value to remove the inline style. | |||
<includeonly> | <includeonly> | ||
<!--Categories--> | <!--Categories--> | ||
[[Category: | [[Category:Formatting and function templates]] | ||
<!--Other languages--> | <!--Other languages--> | ||
Line 49: | Line 56: | ||
[[stq:Foarloage:Border]] | [[stq:Foarloage:Border]] | ||
[[zh:Template:Border]] | [[zh:Template:Border]] | ||
</includeonly> | </includeonly> | ||
</code></code> |
Latest revision as of 16:50, 30 October 2023
![]() |
This is a documentation subpage for Template:Border (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
To place a border around e.g. an image.
Syntax[edit source]
Basic[edit source]
{{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).
Full[edit source]
{{border |element |width=width |style=style |color=color}}
Parameters[edit source]
- element
- (required) The element (image, text, etc) around which the border is to appear.
- width
- The width (thickness) of the border (default 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.