Welcome to Wars Wiki!
Welcome, new users! For help on where to start, look at our getting started page and our manual of style. Need more help? Ask a staff member!

Editing User:Moydow/Sandbox

From Wars Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 120: Line 120:
| Cell C
| Cell C
|}
|}
|}
== colspan and rowspan: Irregular-sized cells ==
One cell can be made to span several rows or columns, by using the <nowiki>colspan</nowiki> and <nowiki>rowspan</nowiki> attributes. This has various useful applications. However, the fact that these attributes eliminate certain cells from other parts of the table's coding can significantly increase the overall complexity of the table. Using the [[Wars Wiki:Sandbox|Sandbox]] and the "Show preview" button to learn how these attributes affect a table's appearance is extremely helpful. The attributes accept a numerical value representing the number of rows or columns a single cell should span. This value should be no less than two, and no greater than the total number of rows or columns in the table. The attributes are added to a cell before the cell's actual content, separated from it by a pipe symbol (|), as follows:
<pre>|colspan="2"|Cell content</pre>.
An example of a table using <nowiki>colspan</nowiki>:
<pre>{| class="wikitable"
! Header 1
! Header 2
! Header 3
|-
|colspan="2"|Cell 1+Cell 2
| Cell 3
|}</pre>
{| class="wikitable"
! Header 1
! Header 2
! Header 3
|-
|colspan="2"|Cell 1+Cell 2
| Cell 3
|}
<nowiki>rowspan</nowiki> is more difficult to code:
<pre>{| class="wikitable"
!rowspan="2"|Header 1+Cell 1
! Header 2
! Header 3
|-
| Cell 2
| Cell 3
|}</pre>
{| class="wikitable"
!rowspan="2"|Header 1+Cell 1
! Header 2
! Header 3
|-
| Cell 2
| Cell 3
|}
|}
Please note that all contributions to Wars Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Wars Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

  [] · [[]] · [[|]] · {{}} · · ~ | ° &nbsp; · ± × ÷ ² ³ ½ · §
[[Category:]] · [[:File:]] · <code></code> · <nowiki></nowiki> <code><nowiki></nowiki></code> · <includeonly></includeonly> · <noinclude></noinclude> · #REDIRECT[[]] · {{DEFAULTSORT:}}