Forum Moderators: not2easy
( table class=myclass" ) is what you have in the html that isn't going to do anything. <table class="myclass">
<th>content</th>
<tr>
<td>content</td>
</tr>
</table> I wonder if the browsers consider that th and td lines like in CSS file related to .myclass ?No, the
th {blablabla2;} and td {blablabla3;} instructions would apply to every <th> and <td> the browser finds in the page unless you were to assign a class to those elements. No, the
th {blablabla2;}
and
td {blablabla3;}
instructions would apply to every <th> and <td> the browser finds in the page unless you were to assign a class to those elements.
th.myclass {blablabla2;} and td.myclass {blablabla3;} <table class="myclass">
<th class="myclass">content</th>
<tr>
<td class="myclass">content</td>
</tr>
</table> .myclass table {blablbla1;}This line means “any table within any element of class myclass”. From your posts, it looks as if you meant
table.myclass {blahblah}
And from there, if appropriate, you go on to table.myclass th {blah blah}
table.myclass td {blahblah}each of which will override any css you may have set for th-in-general or td-in-general.
It is hard to guess what the problem is with your description, sorry. Obviously this is not the content of your css file and the examples give no clue as to what might need some work.
.mytable table {width:100%; border: 4px solid #c2f0c2; border-collapse: collapse; border-spacing:0px;}
td {border: 2px solid #c2f0c2; padding:1px; }