Jump to content

Template:Align: Difference between revisions

From NixOS Wiki
DoggoBit (talk | contribs)
No edit summary
DoggoBit (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
<includeonly>{{#ifeq:{{{align|}}}|center|{{#tag:div|{{#tag:div|{{{1}}}|style=display: inline-block; text-align: left;}}|style=text-align: center; {{#if:{{{width|}}}|width: {{{width}}}|}}}}|{{{1}}}}}</includeonly><noinclude>{{Documentation}}</noinclude>
<includeonly>{{#ifeq:{{{align|}}}|center|{{#tag:div|{{#tag:div|{{{1}}}|style=display: inline-block; text-align: left;{{#if:{{{width|}}}|width: {{{width}}}|}}}}|style=text-align: center;}}|{{{1}}}}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 12:19, 12 July 2025

Template Documentation [edit source| uses| help]

This is a helper template that aligns its content in the centre, if the align parameter is set accordingly. This shouldn't be used in writing articles; its use is to avoid repeating substantial parts of templates when implementing conditional alignment.

Some content

Usage

In a template, wrap the content you want to conditionally align within this template, and forward the align argument:

{{align|align={{{align|}}}|...}}

Template data

Helper template to conditionally align content in the centre. Do not use in usual articles.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Content1

The content to be aligned

Contentrequired
Alignmentalign

The alignment of the content. Any values other than 'center' have no effect.

Suggested values
center left right
Stringsuggested