• 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.

    https://www.beyourowndetective.com/blog

Viewing 9 replies - 1 through 9 (of 9 total)
  • Just underneath the “body” declaration, put this:

    body a {text-decoration: underline;}

    See if that helps.

    Thread Starter netdetective

    (@netdetective)

    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

    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.

    Thread Starter netdetective

    (@netdetective)

    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.

    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.

    Thread Starter netdetective

    (@netdetective)

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

    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.

    *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.

    here, here… I too personally detest underlined links.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘styles.css confusion – what controls embedded links?’ is closed to new replies.