WordPress.org

Ready to get started?Download WordPress

Forums

styles.css confusion - what controls embedded links? (10 posts)

  1. Netdetective
    Member
    Posted 7 years ago #

    I don't know what to edit in styles.css to enable underlines of embedded links in my blog posts. My links are currently red with no underline. In styles.css, I see 5 different instances of "h1, h1 a, h1 a:hover, h1 a:visited {" and "text-decoration: none;" I'm not sure what controls the text links in the blog posts. Also how do I control the color of the active link?

    In the blog pages source code, I see <div class="entry"> in the main blog page, and <div class="entrytext"> in the individual blog pages, but when I looked to find what corresponds to it in styles.css I find it totally confusing.

    http://www.beyourowndetective.com/blog

  2. vkaryl
    Member
    Posted 7 years ago #

    Just underneath the "body" declaration, put this:

    body a {text-decoration: underline;}

    See if that helps.

  3. Netdetective
    Member
    Posted 7 years ago #

    It didn't work. I tried a couple different variants of it.

    I only want to have underlines applied to embedded links within my blog posts and all other links remain as they are, so wouldn't something under body apply to the entire page?

    Thanks

  4. vkaryl
    Member
    Posted 7 years ago #

    Generally, yes. What do you mean by "embedded links"? And once you figure out the cascade to specify, you'll also need to specify whether it applies to all links, just normal, or hover only, etc.

  5. Netdetective
    Member
    Posted 7 years ago #

    By embedded links, I mean links that I added to one of my blog posts. Look for my "Learn more about Detective software" link in my most recent post. I assumed this is controlled by P since it's in a paragraph, or else "entry" and "entrytext," but tracking this down in styles.css lead to confusion. I might have to experiment trial & error to find what works.

    The CSS WordPress uses is much more complex and difficult to understand than the basic CSS I use for my regular webpages.

  6. The CSS WordPress uses is much more complex and difficult to understand than the basic CSS I use for my regular webpages.

    CSS is CSS and it depends on the theme. Has nothing to do with WordPress. ;)

    And that red color is defined here:

    .entry p a:visited {
    color: #b85b5a;
    }

    That means all links are inside a <p> inside of something (in this case a <div>) that has the class of "entry" will be made a dark red. Just change that hex value to something else if you don't want it dark red.

  7. Netdetective
    Member
    Posted 7 years ago #

    Do underlined links get more clicks? If not, I could leave mine as is.

  8. KatGirl
    Member
    Posted 7 years ago #

    Content is king. Makes no difference, really, in the bigger picture if links are underlined, dotted, double underlined or simply colored.

    Its all personal choice. Mine are colored, with a dashed underline when hovered.

    I'd focus more on providing excellent content, that way your links will be "clicked" regardless of how you style them.

    Underline is probably universally seen as an instant "notification" that that link is a link and not just some colored text to the unenlightened.

  9. vkaryl
    Member
    Posted 7 years ago #

    *shrug* Not from me. But that's not necessarily germane to the point. I personally DETEST underlines under any circumstances.

    You'd need to do a search on google or whoever for "relevance of underlined links to SERPs". Whatever.... if your main thing is gaming the SEs you'd be well advised to hunt up some of the "black hat" sites.

  10. KatGirl
    Member
    Posted 7 years ago #

    here, here... I too personally detest underlined links.

Topic Closed

This topic has been closed to new replies.

About this Topic