Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1429336

    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

    • This topic was modified 3 months, 2 weeks ago by elenapoliti.
    #1429341

    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

    #1429343

    Ok, see it in private

    #1429349

    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

    #1429351

    Thanks fixed

    #1429353

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Underline issues with some elements in text’ is closed to new replies.