<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.statsape.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3ATable_alignment%2Fdoc</id>
	<title>模板:Table alignment/doc - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.statsape.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3ATable_alignment%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.statsape.com/index.php?title=%E6%A8%A1%E6%9D%BF:Table_alignment/doc&amp;action=history"/>
	<updated>2026-11-10T14:07:54Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.statsape.com/index.php?title=%E6%A8%A1%E6%9D%BF:Table_alignment/doc&amp;diff=4931&amp;oldid=prev</id>
		<title>Zeroclanzhang：​创建页面，内容为“{{Documentation subpage}} {{TemplateStyles|Template:Table alignment/tables.css}}  == Purpose == To make it simpler to align the columns in tables with less wikicode.  == Usage == Place &lt;code&gt;&lt;nowiki&gt;{{Table alignment}}&lt;/nowiki&gt;&lt;/code&gt; just before the table and then add some classes to the table.  {| class=&quot;wikitable&quot; ! classname ! Purpose |- | &lt;code&gt;defaultleft&lt;/code&gt; || Align all table cells left by default |- | &lt;code&gt;defaultcenter&lt;/code&gt; || Align all table ce…”</title>
		<link rel="alternate" type="text/html" href="https://wiki.statsape.com/index.php?title=%E6%A8%A1%E6%9D%BF:Table_alignment/doc&amp;diff=4931&amp;oldid=prev"/>
		<updated>2024-01-17T16:45:18Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{Documentation subpage}} {{TemplateStyles|Template:Table alignment/tables.css}}  == Purpose == To make it simpler to align the columns in tables with less wikicode.  == Usage == 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.  {| class=&amp;quot;wikitable&amp;quot; ! classname ! Purpose |- | &amp;lt;code&amp;gt;defaultleft&amp;lt;/code&amp;gt; || Align all table cells left by default |- | &amp;lt;code&amp;gt;defaultcenter&amp;lt;/code&amp;gt; || Align all table ce…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&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 effect 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; effect header cells.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
* Column numbers up to &amp;lt;code&amp;gt;col19&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;
&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>Zeroclanzhang</name></author>
	</entry>
</feed>