Template:Border2/s/sandbox
This is the template sandbox page for Template:Border2/s (diff). |
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 {{border2}}). However, some embedded templates that contain parameters, and things like tables, may cause this template to not work properly. In that case, use {{border2/s}} and {{border2/e}} instead.
Parameters
[edit]- 1: 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 yes) or use the full page width (if no)
- Options: yes, no; default: yes
- 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: Default
{{border2|Your content here}}
Your content here
Example: All parameters
{{border2|position=|compact=|class=|attr=| Your content here }}
Your content here
Example: Not compact
{{border2|compact=no| [[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]] {{Mc}}CARTY & DAVIS, No. 171, MARKET STREET. {{rule|3em}} 1834. }}
McCARTY & DAVIS, No. 171, MARKET STREET.
1834.
Example: Position
{{border2|position=right| [[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]] {{right|{{Mc}}CARTY & DAVIS, No. 171, MARKET STREET.}} }}
McCARTY & DAVIS, No. 171, MARKET STREET.
Example: Position
{{border2|position=left| [[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]] {{Mc}}CARTY & DAVIS, No. 171, MARKET STREET. {{rule|3em}} 1834. }}
McCARTY & DAVIS, No. 171, MARKET STREET.
1834.
Example: Border2/s and Border2/e
{{border2/s}} [[File:Philadelphia blackletter.svg|125px|link=|alt=Philadelphia:]] {{Mc}}CARTY & DAVIS, No. 171, 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