Template:Border2
{{{1}}}
| This template uses Lua: |
| This template uses TemplateStyles: |
This template uses block elements, e.g. See H:DIVSPAN for details. |
Usage
[edit]This specialized template creates a box to display text or combined text/images in; it creates a border around whatever you would like. Each property has a default so you do not need to define the setting if what you want is already the default.
You can embed other templates within this one (e.g. {{rule}} or {{sc}} or even another {{border}}). However, embedded templates that contain parameters, and things like tables, may cause this template to not work properly. In that case, use {{border/s}} and {{border/e}} instead.
Note: If you place images inside this box, be sure to define it so that the box is larger than the image.
Example: Default
{{border|Your content here}}
|1= provides the content to be framed and when provided as an unnamed argument, leading and trailing whitespace is not trimmed.
Example: Content needing leading whitespace
{{border|
*Your wikitext list
}}
- Your wikitext list
Example: All parameters
{{border|position=|compact=|class=|max-width=|bstyle=|bthickness=|color=|bgcolor=|align=|padding=|style=|
Your content here
}}
Your content here
Parameters
[edit]- 1 or text or content: whatever goes in the box
- position: alignment of the box
- Options: left, center, right; default: center
- compact: whether the box should take only the width needed (if true) or use the full page width (if false)
- Options: true, false; default: false
- class: additional CSS classes
Examples
[edit]Basic examples
[edit]Example: Not compact
{{border|compact=true|
[[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]]
{{uc|{{Mc}}Carty & Davis,}} No. 171, {{uc|Market Street.}}
{{rule|3em}}
1834.
}}
![]()
McCarty & Davis, No. 171, Market Street.
1834.
Example: Position
{{border|position=right|compact=true|
[[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]]
{{right|{{uc|{{Mc}}Carty & Davis,}} No. 171, {{uc|Market Street.}}}}
}}
![]()
McCarty & Davis, No. 171, Market Street.
Example: Position
{{border|position=left|compact=true|
[[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]]
{{uc|{{Mc}}Carty & Davis,}} No. 171, {{uc|Market Street.}}
{{rule|3em}}
1834.
}}
![]()
McCarty & Davis, No. 171, Market Street.
1834.
Example: border/s and border/e
{{border/s}}
[[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]]
{{uc|{{Mc}}Carty & Davis,}} No. 171, {{uc|Market Street.}}
{{rule|3em}}
1834.
{{border/e}}
![]()
McCarty & Davis, No. 171, Market Street.
1834.
Tracking categories
[edit]- Category:Borders using style parameters (11)
- Category:Pages using pixel widths (border) (6,874)
- Category:Borders using maxwidth parameter (8,427)
- Category:Borders using bstyle parameter (668)
- Category:Borders using bthickness parameter (2,469)
- Category:Borders using color parameter (623)
- Category:Borders using bgcolor parameter (340)
- Category:Borders using radius parameter (305)
- Category:Borders using align parameter (1,109)
- Category:Borders using padding parameter (2,389)
- Category:Borders using style parameter (6,466)
- Category:Borders with numerical arguments (0)
See also
[edit]
- {{Border}}: fully-customizable box
- {{Ruled box}}: for boxes with borders only on top and bottom
- {{Centered Box}}: centered box, width to fit text
- {{Frame}}: full-width frame around content