Jump to content
Wikipedia The Free Encyclopedia

Template:Box-shadow border

From Wikipedia, the free encyclopedia

box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #000;

Template documentation[view] [edit] [history] [purge]
Warning This template is used on approximately 125,000 pages .
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.

{{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. 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. 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)

{{box-shadow border|a|red|2px}}

Left

{{box-shadow border|l|red|2px}}
{{box-shadow border|r|red|2px}}

Top

{{box-shadow border|t|red|2px}}

Bottom

{{box-shadow border|b|red|2px}}

Top and bottom

{{box-shadow border|tb|red|2px}}

Left and right

{{box-shadow border|lr|red|2px}}

All with two colors

{{box-shadow border|a|c1=red|c2=green|w=2px}}

Top and bottom with two colors

{{box-shadow border|tb|c1=red|c2=green|w=2px}}

Left and right with two colors

{{box-shadow border|lr|c1=red|c2=green|w=2px}}

Wide left and right with offset padding

padding:0.25em 3em; {{box-shadow border|lr|c1=red|c2=green|w=2em}}

Wide left and right with minimal offset padding

padding:0.25em 2.25em; {{box-shadow border|lr|c1=red|c2=green|w=2em}}

See also

The above documentation is transcluded from Template:Box-shadow border/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.

AltStyle によって変換されたページ (->オリジナル) /