Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

How to add font color in the same class when using link in CSS?

  .FocusedRowStrong td {
            background-color: #aeb6bf !important;              
        }

Avatar of Sam Jacobs
Sam Jacobs
Flag of United States of America image

Not quite sure that I understand your question ...
Are you just looking to add:
color: #0000ff;    (add !important if you need to override inline CSS)

Open in new window

to your selector?
Avatar of VBdotnet2005

ASKER

Right now, It changes only background color in td. What if I have a link in a td, how can I format link's font and color in the same class  .FocusedRowStrong ?
For the link, try:
a:link .FocusedRowStrong td {
    color: #0000ff;
    text-decoration: underline;              
}

Open in new window

You may also want to set
a:visited .FocusedRowStrong td {
    color: #0000ff;
    text-decoration: underline;              
}

Open in new window



The CSS for a link inside the TD would be link this:

.FocusedRowStrong td a:link {
    color: red;
}

Open in new window

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.