19,427
edits
(changed sample OCF links (RIP OCF); removed some niche advice on specific templates; various wording) |
m (changed tip to take advantage of new Center template) |
||
Line 134: | Line 134: | ||
Normally we apply the class "wikitable" to a table to give it borders and make it look pretty with <code>{| class="wikitable"</code>, though you can do a lot of manual styling for almost any custom look you want (see {{SectionLink||Further help}} to read more about tables). | Normally we apply the class "wikitable" to a table to give it borders and make it look pretty with <code>{| class="wikitable"</code>, though you can do a lot of manual styling for almost any custom look you want (see {{SectionLink||Further help}} to read more about tables). | ||
To make the table a fixed width, add this CSS styling to the first line: <code>{| style="width:500px;"</code>. You can also use a percentage such as <code>width:50%;</code>. To center the table on the page, use <code>{| style=" | To make the table a fixed width, add this CSS styling to the first line: <code>{| style="width:500px;"</code>. You can also use a percentage such as <code>width:50%;</code>. To center the table on the page, use <code>{| style="[[Template:Center|<nowiki>{{center}}</nowiki>]]"</code>. To right-align it, use <code>"float:right;"</code> instead. | ||
You can add styling directives to individual columns, rows and cells like this: | You can add styling directives to individual columns, rows and cells like this: |