Jump to content

Template:Align

From Blunt Wiki

Places content (text, an image, a table) on the left, on the right or in the centre of the page. Works without Lua/Scribunto; needs only the ParserFunctions extension.

Usage

{{Align|left|CONTENT}}
{{Align|right|CONTENT}}
{{Align|center|CONTENT}}
  • left and right float the content: following text flows around it.
  • center (or centre) places it in the middle of the page; text does not flow around it.

Examples

Code Result
{{Align|right|'''Right-aligned text'''}}
Right-aligned text
{{Align|center|Centred text}}
Centred text
{{Align|left|Left box|style=border:1px solid #a2a9b1;padding:4px;}}
Left box

Parameters

Parameter Description
1 Required. left, right or center.
2 ), write {{!}}.
style Extra CSS, e.g. width:20em; or font-size:90%;.

To stop text from flowing around floated content, add <div style="clear:both;"></div> after it.

Aligns content to the left, right or centre of the page.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Alignment1

no description

Suggested values
left right center
Linerequired
Content2

Use 2= if the content contains an equals sign.

Contentrequired
Stylestyle

Extra CSS.

Stringoptional