0

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?

Paul
  • 1,277
  • 5
  • 28
  • 56
  • You have a error in your rule: it should be `.entry-content a` with a dot before `entry-content`. – saNs Sep 12 '17 at 23:31
  • Can you show us the HTML surrounding the link, the css for the container elements, and a working demo of the issue - preferably as a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) but even a link to your live site would help. – FluffyKitten Sep 12 '17 at 23:51
  • If you are having to use important, then your specificity is not correct. Please provide a link so that we can see the problem real-time. – Kodaloid Sep 13 '17 at 11:25

2 Answers2

1

There is (.) missing before the class object:

.entry-content a{
text-decoration: none !important!;}    
Hilamo
  • 11
  • 2
0

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>
Sameer
  • 383
  • 1
  • 10