Forum Moderators: not2easy
Lets say I have a class for table like this:
table.content{
color: #39c
background-color: #ccc;
}
now what I want to do is to specify td style (background color) for that specific table.content without having to specify a new class for those td.
right now i have it set up like this:
td.content{
color: #39c;
background-color: #eee;
}
the result is I have to specify the class="content" for evrery td (I know I'm lazy), so is there an easier way like:
table.content:td{
color: #39c;
background-color: #eee;
}
I know that doesn't work, but hopefully you understand what I mean. thanks for the help.
mavherick
Just remove the colon between content and td. That is if you would like it to affect all td within your table called content. You could use `>` where you had your colon if you want only the first td within your table `content` to be affected.
You can use `>` as long as the element is exactly
one level deep within your container. If anything is
inbetween the container tag and the element you want to
change- it will not work.
Use `+` when you want to affect the next element
in line. For ie., the element h3.content must immediately
preceed the p...
h3.content + p {
Style this paragraph...
}</add>