In a HTML table with class of 'testtable', is there any difference between selecting a element in that table with the following two css selectors?
.testtable td{}
and
td.testtable{}
In a HTML table with class of 'testtable', is there any difference between selecting a element in that table with the following two css selectors?
.testtable td{}
and
td.testtable{}
.testtable td{}
selects a td
that has a parent with the class testtable
, for example:
<table class="testtable"> <td>I'm selected</td> </table>
td.testtable{}
selects a td
that has the class testtable
, for example:
<table> <td class="testtable">I'm selected</td> </table>