Difference between revisions of "Template:Border"

From blackwiki
Jump to navigation Jump to search
imported>Great Brightstar
imported>Great Brightstar
(Get better inline appearence)
Line 1: Line 1:
{{#if:{{{noinline|}}}||<span style="display:inline;">}}<span style="display:table-cell;<!--(seemingly ignored by IE)--> <!--border-collapse:collapse;--> border:{{{width|1px}}} {{{style|solid}}} {{{color|#ddd}}}; {{#if:{{{lh|{{{line-height|}}}}}}|line-height:{{{lh|{{{line-height|}}}}}};}}">{{{1}}}</span>{{#if:{{{noinline|}}}||</span>}}<noinclude>{{documentation}}
+
<span style="display:{{#if:{{{noinline|}}}|table-cell|inline-block}};<!--("table-cell" seemingly ignored by IE)--> <!--border-collapse:collapse;--> border:{{{width|1px}}} {{{style|solid}}} {{{color|#ddd}}}; {{#if:{{{lh|{{{line-height|}}}}}}|line-height:{{{lh|{{{line-height|}}}}}};}}">{{{1}}}</span><noinclude>{{documentation}}
 
<!--Please add any interwiki links etc on the /doc page, not here - thanks!-->
 
<!--Please add any interwiki links etc on the /doc page, not here - thanks!-->
 
</noinclude>
 
</noinclude>

Revision as of 13:40, 4 November 2016

{{{1}}}

Template documentation[view] [edit] [history] [purge]

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 default inline-block display style.
Some text Abc
Inline reading Abc

See also