<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.rord.club/index.php?action=history&amp;feed=atom&amp;title=Template%3ATable_alignment%2Fdoc</id>
	<title>Template:Table alignment/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.rord.club/index.php?action=history&amp;feed=atom&amp;title=Template%3ATable_alignment%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.rord.club/index.php?title=Template:Table_alignment/doc&amp;action=history"/>
	<updated>2026-09-12T06:54:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.rord.club/index.php?title=Template:Table_alignment/doc&amp;diff=935&amp;oldid=prev</id>
		<title>Bleach: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.rord.club/index.php?title=Template:Table_alignment/doc&amp;diff=935&amp;oldid=prev"/>
		<updated>2025-07-29T09:48:50Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:48, 29 July 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki:diff:1.41:old-934:rev-935 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bleach</name></author>
	</entry>
	<entry>
		<id>https://wiki.rord.club/index.php?title=Template:Table_alignment/doc&amp;diff=934&amp;oldid=prev</id>
		<title>wikipedia&gt;Timeshifter: /* See also */ link</title>
		<link rel="alternate" type="text/html" href="https://wiki.rord.club/index.php?title=Template:Table_alignment/doc&amp;diff=934&amp;oldid=prev"/>
		<updated>2025-03-30T08:25:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;See also: &lt;/span&gt; link&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{High-use}}&lt;br /&gt;
{{TemplateStyles|Template:Table alignment/tables.css}}&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
To make it simpler to align the columns in tables with less wikicode.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Place &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Table alignment}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; just before the table and then add some classes to the table.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! classname&lt;br /&gt;
! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;defaultleft&amp;lt;/code&amp;gt; || Align all table cells left by default&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;defaultcenter&amp;lt;/code&amp;gt; || Align all table cells center by default&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;defaultright&amp;lt;/code&amp;gt; || Align all table cells right by default&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;col&amp;#039;&amp;#039;N&amp;#039;&amp;#039;left&amp;lt;/code&amp;gt; || Align the cells in column &amp;#039;&amp;#039;N&amp;#039;&amp;#039; left, where N is a number&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;col&amp;#039;&amp;#039;N&amp;#039;&amp;#039;center&amp;lt;/code&amp;gt; || Align the cells in column &amp;#039;&amp;#039;N&amp;#039;&amp;#039; center, where N is a number&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;col&amp;#039;&amp;#039;N&amp;#039;&amp;#039;right&amp;lt;/code&amp;gt; || Align the cells in column &amp;#039;&amp;#039;N&amp;#039;&amp;#039; right, where N is a number&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With the wikitable class the header cell content is always centered unless individually adjusted.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;col&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039; classes never affect the header cells (column, row, or anywhere) if the wikitable class is used. The &amp;#039;&amp;#039;&amp;#039;col&amp;#039;&amp;#039;&amp;#039; class overrides the &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039; class.&lt;br /&gt;
&lt;br /&gt;
If the wikitable class is not used, then &amp;#039;&amp;#039;&amp;#039;col&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039; affect header cells.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
* Column numbers up to &amp;lt;code&amp;gt;col29&amp;lt;/code&amp;gt; are supported. A table can have more columns but they cannot be aligned with this method.&lt;br /&gt;
* On tables using &amp;lt;code&amp;gt;rowspan&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;colspan&amp;lt;/code&amp;gt;, using the classes may not work well on those rows because the alignment appears in wrong cells. Normal table code like {{nowrap|1=&amp;lt;code&amp;gt;style=&amp;quot;text-align: left/center/right;&amp;quot;{{!}} &amp;#039;&amp;#039;cell content&amp;#039;&amp;#039;&amp;lt;/code&amp;gt;}} can be added to individual cells, both to get the wanted alignment and override unwanted alignment.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline-table; vertical-align:top;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Table alignment}}&lt;br /&gt;
{| class=&amp;quot;wikitable defaultcenter col1left col4right&amp;quot;&lt;br /&gt;
!Item1&lt;br /&gt;
!Item2&lt;br /&gt;
!Item3&lt;br /&gt;
!Item4&lt;br /&gt;
|-&lt;br /&gt;
|AAAAAA&lt;br /&gt;
|100-200&lt;br /&gt;
|3-4&lt;br /&gt;
|53.43&lt;br /&gt;
|-&lt;br /&gt;
|BBB&lt;br /&gt;
|5-6&lt;br /&gt;
|7-8&lt;br /&gt;
|5563.35&lt;br /&gt;
|-&lt;br /&gt;
|CC&lt;br /&gt;
|9-10&lt;br /&gt;
|113-125&lt;br /&gt;
|322313.00&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline-table; vertical-align:top;&amp;quot;&amp;gt;&lt;br /&gt;
{{Table alignment}}&lt;br /&gt;
{| class=&amp;quot;wikitable defaultcenter col1left col4right&amp;quot;&lt;br /&gt;
!Item1&lt;br /&gt;
!Item2&lt;br /&gt;
!Item3&lt;br /&gt;
!Item4&lt;br /&gt;
|-&lt;br /&gt;
|AAAAAA&lt;br /&gt;
|100-200&lt;br /&gt;
|3-4&lt;br /&gt;
|53.43&lt;br /&gt;
|-&lt;br /&gt;
|BBB&lt;br /&gt;
|5-6&lt;br /&gt;
|7-8&lt;br /&gt;
|5563.35&lt;br /&gt;
|-&lt;br /&gt;
|CC&lt;br /&gt;
|9-10&lt;br /&gt;
|113-125&lt;br /&gt;
|322313.00&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Align a column of row headers ==&lt;br /&gt;
&lt;br /&gt;
With the wikitable class the header cell content is always centered unless individually adjusted. So the template is no help with row header cells in this case. &lt;br /&gt;
&lt;br /&gt;
Instead do a mass search-and-replace to add &amp;#039;&amp;#039;&amp;#039;style=text-align:left&amp;#039;&amp;#039;&amp;#039; to each row header cell. To do so be sure the table is in a separate article section, or in a sandbox. Click on the wikitext source editing link. Click on &amp;quot;Advanced&amp;quot; in the editing toolbar. Then click on the &amp;quot;search and replace&amp;quot; icon on the right. Fill in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Search for&amp;quot;&amp;#039;&amp;#039;&amp;#039; box with: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fill in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Replace with&amp;quot;&amp;#039;&amp;#039;&amp;#039; box with: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;! style=text-align:left|&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure all the option boxes are unchecked. Then click &amp;#039;&amp;#039;&amp;#039;&amp;quot;Replace all&amp;quot;.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Preview the page. Remove &amp;lt;code&amp;gt;style=text-align:left|&amp;lt;/code&amp;gt; from the column headers. An easier way may be to cut out the top headers before the search-and-replace, and park them in Notepad or elsewhere.&lt;br /&gt;
&lt;br /&gt;
Other individual cell adjustments may be needed. Publish the page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{t|shy}} – Can be used to help narrow columns by adding a [[soft hyphen]] to a word to allow it to wrap.&lt;br /&gt;
More [[WP:template styles|template styles]] for tables:&lt;br /&gt;
* {{t|sticky header}} - Makes column headers stick to the top of the page while scrolling through table data. &lt;br /&gt;
* {{t|sticky table start}} - allows sticky rows and columns inside a scrollable area.&lt;br /&gt;
* {{t|sort under}} - moves the sorting arrows under the headers.&lt;br /&gt;
* {{t|row hover highlight}} - adds row hover highlighting, and option for white background. &lt;br /&gt;
* {{t|static row numbers}} - adds a column of row numbers to a table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line --&amp;gt;&lt;br /&gt;
[[Category:Table templates]]&lt;br /&gt;
[[Category:Templates using TemplateStyles to style external elements]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Timeshifter</name></author>
	</entry>
</feed>