Teamplaid:Center
Coltas
This template does not function for the mobile view and mobile applications. Be aware that more than half of the Wikipedia visitors are via mobile. |
This template is used on a very large number of pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its /sandbox or /testcases subpages, or in your own user space. The tested changes can then be added to this page in one single edit. Please consider discussing any changes on the talk page before implementing them. |
This teamplaid is used in MediaWiki:Abusefilter-top100. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this teamplaid's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this teamplaid. Please discuss any changes on the talk page before implementing them. |
Tuairisgeul - Description
[deasaich]It is to center elements on a page. See also Template:Align for more options and flexibility.
Ùsaid - Usage
[deasaich]Markup | Renders as |
---|---|
{{Center|Hello world!}} |
Hello world!
|
To do this without a template, simply use the following code:
<div class="center" style="width:auto; margin-left:auto; margin-right:auto;">...</div>
To center a table, see Help:TABLECENTER.
Tables
[deasaich]Using {{left}}
/ {{center}}
/ {{right}}
Header text | ||
---|---|---|
Left |
Center |
Right |
Using {{Align|left}}
/ {{Align|center}}
/ {{Align|right}}
Header text | ||
---|---|---|
Left |
Center |
Right
|
Teamplaid-dàta - TemplateData
[deasaich]This is the TemplateData documentation for this template used by VisualEditor and other tools.
Center
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.
Paramadair | Tuairisgeul | Seòrsa | Staid | |
---|---|---|---|---|
Content | 1 | gun tuairisgeul | Susbaint | riatanach |
Custom CSS | style | gun tuairisgeul | Chan eil fhios | roghainneil |
Faic cuideachd - Also see
- {{Align}}
- {{Left}}
- {{Right}}
- {{Image frame}}
The above documentation is transcluded from Teamplaid:Center/documentation. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /documentation subpage. Subpages of this template. |