Template:Center: Difference between revisions

From OniGalore
(Created page with "<includeonly>margin-left:auto; margin-right:auto</includeonly><noinclude> When making a table, it can be tiresome to look up or type the directive to make it centered. Instead, transclude this text like so… <tt><nowiki>{| style="{{center}}"</nowiki></tt> …to get the following result: <tt><nowiki>{| style="margin-left:auto; margin-right:auto"</nowiki></tt> You will need to place a ';' after "<nowiki>{{center}}</nowiki>" if adding more attributes to the style. C...")
 
(No difference)

Latest revision as of 19:13, 27 April 2025

When making a table, it can be tiresome to look up or type the directive to make it centered. Instead, transclude this text like so…

{| style="{{center}}"

…to get the following result:

{| style="margin-left:auto; margin-right:auto"

You will need to place a ';' after "{{center}}" if adding more attributes to the style.