This tutorial is aimed to show you the basics in selecting things within a table. Now if you know anything about CSS, you know that,
Code: Select all
table {}CSS stands for cascading style sheet. basically, you make a site, and everything can be edited with CSS rather than revamping the entire thing, and the most common thing on site is usually a table.
Code: Select all
<table>
<tr><td>
stuff here
</tr></td>
</table>Code: Select all
<table border="0">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2
to edit its properties it would look like this for the whole table:
Code: Select all
table { background-color:yellow; }Code: Select all
table tr { background-color:blue !for row 1; }
table tr tr { background-color:green !for row 2; }Code: Select all
table td { background-color:blue !for collum 1; }
table td td { background-color:green !for collum 2; }Code: Select all
<table>
<tr><td>
1
</tr></td>
<tr><td>
2
</tr></td>
<tr><td>
3
</tr></td>
</table>to seperate between tables you use "classes":
Code: Select all
<table class="w00t">
<tr><td>
1
</tr></td>
<tr><td>
2
</tr></td>
<tr><td>
3
</tr></td>
</table>.w00t table td td td { }
Divs can also be put into tables, as well as tables in tables. an example of a div in a table:
Code: Select all
<table>
<tr><td>
All Your Base Are Belong To Us.
</tr></td>
<tr><td>
<div class="extra">
This would be extra stuff in the table, in the form of a div.
</div>
</tr></td>
</table>Selecting tables in tables in done in the same way selecting rows/collums in a table.
Code: Select all
table table td {}

