Tagged: CSS, enfold, underline links
I added to my custom css file a rule that all links should be underlined as follows:
#top >a {
text-decoration: underline!important;
}
#top >a strong {
text-decoration: underline!important;
}
This works fine in pages. However in text fields present in posts or portfolio the rule is not applied. Inspecting at the rules applied I see that a rule on base.css overwrites my custom rules:
#top a:where(:not(.wp-element-button)) {
text-decoration: none; /* WP 6.1 fix */
}
I added then in my custom rule a new one:
#top a:where(:not(.wp-element-button)) {
text-decoration: underline!important;
}
But this new rule doesn’t affect the whole post page. I tried to clear cache, both from my browser and from the server, but the base.css rule still overwrites my custom rule.
How can I fix it? Thanks
Hey Elena,
Please link to one of your post pages so we can examine the links that are not getting the underline and offer some additional css.
Best regards,
Mike
Ok, see it in private
Hi,
Try adding this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:
#top strong > a {
text-decoration: underline!important;
}
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.
Best regards,
Mike
Thanks fixed
Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike