how to change the wordpress theme css

34 views Asked by At

I have a problem with my wordpress theme. an web developer has customised the theme. Now i want to edit this theme, aspecially the <a tag. so I did;

I edit the extra CSS inside my theme with;

#a{
  color: #4c4c4c;
}

#a:link{
  color:#4c4c4c;
}

#a:visited{
  color:#4c4c4c;
}

#a:hover{
  color: #4c4c4c;
}

#a:active{
  color: #4c4c4c;
}

#a:focus{
  color:#4c4c4c;
}

the hover color that this developer has changed has now go to the #4c4c4c color. but the color when you're no hovering is still the color this developer has set.

do anyone knows how i can change this??

2

There are 2 answers

0
Johannes On BEST ANSWER

You don't address <a> tags using #a { ... } as a selector – #a would be the selector for an element that has "a" as its ID , like <p id="a">....

Links are simply addressed via a:link { ... } in CSS, and all other variants (:visited, :hover, :active, :focus)

0
Kuldip Navadiya On

Try like this:

#a{
  color: #4c4c4c !important;
}

The ! important property in CSS means that all subsequent rules on an element are to be ignored, and the rule denoted by ! important is to be applied. This rule overrides all previous styling rules ​-- the ! important property increases its priority.