removing underline from text with links

  • Unknown's avatar

    I am using the Elemin theme which underlines texts with links. In some themes it does not do this. Is there CSS that would prevent text from being underlined when linked?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there, and absolutely. Add this to your custom CSS to get rid of the underline on links.

    a {
        color: #000;
        text-decoration: none;
    }

    I might suggest the following also, and then remove the black color style attribute from your links in your pages and posts. It is always a good idea to have a hover effect of some sort on links to help visitors know they are solidly one one.

    a:hover {
        color: #615e8b;
    }

    I used the same purple color you have in your header for the hover color, but you can of course edit that as you desire.

  • Unknown's avatar

    Thanks so much!! Can you tell me how to remove the black color style attribute from my links?

  • Unknown's avatar

    Sorry about that. I should ask WP support about that.
    Many thanks for your help!

  • Unknown's avatar

    No worries and you are welcome.

    If you open your posts/pages that have links, and switch to the Text tab in the editor, you will see something like this for the links.
    <span style="color:#000000;"><strong><a href="http://serealities.com/characters-earth-bound/" title="Characters-House of Harwood" style="color:#000000;">Characters</a></strong></span>
    Remove the opening and closing span tags and delete the “style” attribute from the link code so that it looks like this.
    <strong><a href="http://serealities.com/characters-earth-bound/" title="Characters-House of Harwood">Characters</a></strong>

  • The topic ‘removing underline from text with links’ is closed to new replies.