简体   繁体   中英

text-decoration will not disappear

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:

在此处输入图片说明

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?

There is (.) missing before the class object:

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

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM