Changes

Jump to navigation Jump to search
no edit summary
{{documentation subpage}}

'''{{tl|Box-shadow border}}''' provides style declarations to show a visual line, similar to a border, at one or more sides of an element.

This template is useful where an element should not have a border, or uses a border already. [[Template:Navbox|Navboxes]], in particular, use borders to give the appearance of spacing between elements.

This template should complement text, instead of taking the place of text. Opera Mini and Internet Explorer 8 and earlier ignore this template's style declarations, leaving only the text perceivable. Color blind and visually impaired users may also only perceive the text.

Wide borders may overlap the text inside the navbox elements since the borders are drawn on the inside of the element. To avoid this overlap, increase the cell padding using value greater than the border width. For a title navbox, the default title padding is '0.25em 1em', so a "left right" border of size '2em' should be offset with between '2.25em' and '3em' padding on the left and right depending on the desired appearance.

== Examples ==
=== All (default) ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|a|red|2px}}
| title = <nowiki>{{box-shadow border|a|red|2px}}</nowiki>
}}
=== Left ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|l|red|2px}}
| title = <nowiki>{{box-shadow border|l|red|2px}}</nowiki>
}}
=== Right ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|r|red|2px}}
| title = <nowiki>{{box-shadow border|r|red|2px}}</nowiki>
}}
=== Top ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|t|red|2px}}
| title = <nowiki>{{box-shadow border|t|red|2px}}</nowiki>
}}
=== Bottom ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|b|red|2px}}
| title = <nowiki>{{box-shadow border|b|red|2px}}</nowiki>
}}
=== Top and bottom ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|tb|red|2px}}
| title = <nowiki>{{box-shadow border|tb|red|2px}}</nowiki>
}}
=== Left and right ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|lr|red|2px}}
| title = <nowiki>{{box-shadow border|lr|red|2px}}</nowiki>
}}
=== All with two colors ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|a|c1=red|c2=green|w=2px}}
| title = <nowiki>{{box-shadow border|a|c1=red|c2=green|w=2px}}</nowiki>
}}
=== Top and bottom with two colors ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|tb|c1=red|c2=green|w=2px}}
| title = <nowiki>{{box-shadow border|tb|c1=red|c2=green|w=2px}}</nowiki>
}}
=== Left and right with two colors ===
{{navbox|navbar=off
| titlestyle = {{box-shadow border|lr|c1=red|c2=green|w=2px}}
| title = <nowiki>{{box-shadow border|lr|c1=red|c2=green|w=2px}}</nowiki>
}}

=== Wide left and right with offset padding ===
{{navbox|navbar=off
| titlestyle = padding:0.25em 3em; {{box-shadow border|lr|c1=red|c2=green|w=2em}}
| title = <nowiki>padding:0.25em 3em; {{box-shadow border|lr|c1=red|c2=green|w=2em}}</nowiki>
}}

=== Wide left and right with minimal offset padding ===
{{navbox|navbar=off
| titlestyle = padding:0.25em 2.25em; {{box-shadow border|lr|c1=red|c2=green|w=2em}}
| title = <nowiki>padding:0.25em 2.25em; {{box-shadow border|lr|c1=red|c2=green|w=2em}}</nowiki>
}}

== See also ==
* {{tl|box-shadow}}
* {{tl|Rail navbox titlestyle}}
<includeonly>
[[Category:Text color templates]]
</includeonly>
Anonymous user

Navigation menu