• Home
  • Random
  • Recent changes
  • Special pages
  • Community portal
  • Settings
  • About Consumer Rights Wiki
  • Disclaimers
Consumer Rights Wiki

Template:Center

  • Language
  • Watch
  • Edit
Template documentation[view] [edit] [history] [purge]

Script error: No such module "High-use".

Contents

  • 1 Description
  • 2 Usage
    • 2.1 Tables
  • 3 Tracking categories
  • 4 TemplateData
  • 5 See also

Description edit

It is to center elements on a page. See also Template:Align for more options and flexibility.

Usage edit

Markup [[:Template: Renders asTemplate:For loop
Page Template:Markup/styles.css has no content.

To do this without a template, simply use the following code: <syntaxhighlight lang="HTML">

...

</syntaxhighlight> To center a table, see Help:TABLECENTER.

Notes:

  • If the markup to be centered includes an equals sign, the markup must be preceded by 1=. Example: {{Center|1=the <span style="color:red">red</span> one}}.
  • If the markup to be centered includes a displaying pipe, the pipe must be escaped as {{!}} or &#124;.

Tables edit

Using Template:Tlc / Template:Tlc / Template:Tlc

Header text
Template:Left
Center
Template:Right

Using Template:Tlc / Template:Tlc / Template:Tlc

Header text
Template:Align Template:Align Template:Align

Tracking categories edit

  • Template:Clc
  • Template:Clc

TemplateData edit

Template:TemplateDataHeader

A simple template to center-align content in tables and other places. Be aware that the center class is applied to this template, which means every element within the template has its left and right margins set to auto. This may harm some templates.

Template parameters

ParameterDescriptionTypeStatus
Content1

Content to be centered

Contentrequired
Custom CSSstyle

Optional css styling for the centered text

Stringoptional

See also edit

  • {{Center block }}
  • {{Align }}
  • {{Right }}, {{Left }} and {{Justify }}
  • {{Image frame }}
  • {{Table alignment }} - to align whole columns in tables.
The above documentation is transcluded from Template:Center/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://consumerrights.wiki/index.php?title=Template:Center&oldid=18634"
Last edited on 13 August 2025, at 04:27

Languages

    This page is not available in other languages.

    Consumer Rights Wiki
    • This page was last edited on 13 August 2025, at 04:27.
    • Content is available under Creative Commons Attribution-ShareAlike 4.0 International unless otherwise noted.
    • 🔔 We have recently updated our privacy policy. Have a look here: Privacy policy
    • All submissions to the site are subject to the wiki's licence, CC 4.0 BY-SA, as found here
    • Privacy policy
    • About Consumer Rights Wiki
    • Disclaimers
    • Desktop