Styling all anchor tags inside the <td> element
I already have a css section:
.leftMemberCol
{
width:125px;
vertical-align:top;
padding: 13px;
border-width:0px;
border-collapse:separate;
border-spacing: 10px 10px;
text-align:left;
background-color:#f2f3ea;
}
for the td section (left panel). I want all links inside this cell to be green.
is there any syntax like:
.leftMemberCol.a
{
color:#E3E3CA;
}
or any other suggestions instead of going to each page and wrapping all links around a different class name.
+2
source to share
7 replies
You are very close. This is how you select the links inside the cell:
.leftMemberCol a
{
color: #E3E3CA;
}
Read more about selectors here .
Edit:
If the style does not take effect, it is likely because you have a different style defined for more specific links. You can make the style more specific by adding specifiers, for example:
td.leftMemberCol a
{
color: #E3E3CA;
}
As a last resort, you can also use the directive !important
:
.leftMemberCol a
{
color: #E3E3CA !important;
}
0
source to share