Maybe i am doing this wrong but i have:
<td style="width: 15%; vertical-align: text-top; background:#666;">
<strong><div style="color:#FFF;">Description:</div></strong>
</td>
Is it possible to create a css <style> class, only one so i can do something like:
<td class="darkstyle">Description</td>
And the <div> would get applied as well or would it need to be:
<td class="darkstyle"><div>Description</div></td>
My problem with the class is that i can change the background or the foreground but not both and not for nested elements. Not sure what i'm doing wrong.
EDIT:
.darkstyle
{
background: #666;
color: #FFF;
}
<td colspan="4" class="darkstyle">
<div>Description</div>
</td>
Maybe i did it wrong, the background changes color but not the text color of the Description, this stays black :S
td, div { background: #666; }. Not sure if that's what you're looking for..darkstyle {width: 15%; vertical-align: text-top; background:#666;color:#FFF;}<td class="darkstyle">Description</td><p>,<div>,<spam>,<td>, or?