Template:Align

From The Languages of David J. Peterson
Revision as of 11:55, 11 August 2023 by Djp (talk | contribs) (Created page with "{{#switch: {{lc:{{{1|center}}}}} |left = <div style="float: left;{{#if: {{{style|}}} | {{{style}}};}}">{{{2}}}</div> |right = <div style="float: right;{{#if: {{{style|}}} | {{...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
{{{2}}}

This template aligns its contents to the left, to the right, or centered.

If the alignment is set to center it is implemented using {{center}}, but otherwise it is implemented using a <div> with CSS float: left; or float: right;.

Parameters

|1=
The alignment. The valid values are left, right, and center. Defaults to center if not specified. While this parameter is optional, |2= is required. (Use {{align||foo}} to omit |1=.)
|2=
The content to be aligned.
|style=

Ignored unless the alignment is set to center, in which case any value given is sent directly to {{center}}'s |style= parameter.