text-decoration will not disappear

714 views Asked by At

I am trying to customise a theme in wordpress and I am having a problem with the styling of links. Particularly I am referring to links you add to your post. I can change the color of these, but the underlining will not go, despite the css rule:

a, .entry-meta a, entry-content a {
   color: #cc6633;
   transition: color .5s linear;
   text-decoration: none!important;

}

the color changes, the transition works, but the text-decoration doesn't. Also, the underlining remains a different color (so the color is not being applied to the underlining). Anyone else has had this problem? Thanks

edit////////////////////////////////////////////////////////

I have now removed the line:

text-decoration: none;

and found this:

enter image description here

It's quite subtle due to the styles, but you can see the underlining comes back and the "other" underlining remains (it's dark grey). This means there are "two" underlinings being applied to the same link?

2

There are 2 answers

0
Hilamo On

There is (.) missing before the class object:

.entry-content a{
text-decoration: none !important!;}    
0
Sameer On

1st, give a space between the none and !important. 2nd, There may be some other class which has text-decoration: underline !important, which is being applied after your style,

try giving the a tag an inline style and see how it goes.

<a style="text-decoration: none !important;"></a>