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=|attr=|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
- attr: additional attributes for the box
- Example:
attr=id{{=}}"border-id"
- Example: in another template based on this one,
attr={{optional style|...}}
- Example:
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.
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