Click to See Complete Forum and Search --> : Selecting specific elements?


th1666
04-19-2009, 02:01 PM
My page has something like this:

<table>

<table>
<td></td>
</table>

<table>
<td></td>
</table>

</table>

Is there anyway I could select the second table in the overall table? Like table table(2) or something?

I can't use IDs or classes because I'm styling a page on MySpace. So I have to put the CSS in one of the text areas on my page. Can I tell it to apply the CSS to the second one in order?

Quidam
04-19-2009, 04:32 PM
table + table {
color: red;
}


Note that this will also select the third and fourth and so on..

However, you can do this to the rest

table + table + table {
color: white;
}


That will select the third, fourth and fifth and so on..