WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] changing appearance of links within a post (9 posts)

  1. MDBlogs
    Member
    Posted 5 years ago #

    This is probably very easy to do, but I just don't know where to find it.

    I love my theme, except for the way it treats links (by merely underlining them). I'd like to experiment with changing the way the link is indicated in the post. To do that

    a) where do I find the code to change?
    b) how is written to code for underlining?
    and
    c) how would I change that to not be underlined but instead to be a different color.

    (I know how to find color codes, I just don't know where in the code pages I find the trigger for the appearance of my links.)

    thanks, as always, to anyone who can point me the right direction.

    md

  2. t31os
    Member
    Posted 5 years ago #

    style.css

    You'd be looking for or creating something along these lines...

    .post a,.post a:link,.post a:visited {
      color:#f00;
      text-decoration:underline;
    }
    .post a:hover,.post a:active {
      color:#fff;
      text-decoration:none;
    }

    Or possibly..

    .entry a,.entry a:link,.entry a:visited {
      color:#f00;
      text-decoration:underline;
    }
    .entry a:hover,.entry a:active {
      color:#fff;
      text-decoration:none;
    }

    Depending on what class your theme relies on.

    Adjust color and text-decoration as required..

    http://www.w3schools.com/css/css_colornames.asp
    http://www.w3schools.com/Css/pr_text_text-decoration.asp

  3. MDBlogs
    Member
    Posted 5 years ago #

    Thanks for your prompt and helpful reply.

  4. t31os
    Member
    Posted 5 years ago #

    You're welcome. ;-)

  5. MDBlogs
    Member
    Posted 5 years ago #

    Oops, not quite solved after all.
    Not sure if you are still plugged into my challenge, or if I need to create a new post.

    I have scrolled through the style sheet at least a dozen times without finding any kind of code that looked like what you've indicated above.

    The only thing that is written that even uses the word link is:

    .more-link {
    clear: both;
    display: block;
    margin-top: 30px;
    margin-left: 20px;
    font-size: 0.9em;
    color: #88897b;
    background: url(images/more-link.png) no-repeat left center;
    padding-left: 30px;

    And I think this has to do with expanding posts or going to other posts, rather than linking to a URL. Where else might I find it, any ideas?

    Right now, when I make a link in a post, it is underlined, in the same color as the rest of the text.

    Thanks if you can keep helping!

    md

  6. t31os
    Member
    Posted 5 years ago #

    Like i said before, if it's not there already, then add it into the stylesheet, try each one of the examples i gave.

    If neither work please provide a link to your page..

  7. MDBlogs
    Member
    Posted 5 years ago #

    Thanks. It did work: the links changed color. The links are still underlined, but they are a different color.

    Oddly, it also changed the color of the header for the post and added an underline. I'm not wild about that look. So now I have two more questions:

    1) How do I keep the Post title from changing color and having the underscore?

    2) Is it possible to remove the underline so that the link is just a different color test?

    You've been so responsive, I'm really thankful.

    md

  8. MDBlogs
    Member
    Posted 5 years ago #

    I tried the second suggestion you made, and this solved the problem with the post headlines changing. So try both before writing, yes, I know.

    Still not sure how to remove the underscore within the text, but I'll try to sort it out. Thanks again for your good suggestion.

  9. t31os
    Member
    Posted 5 years ago #

    *, *:link, a, a:link {text-decoration:none}

    Should grab most links and remove the underline...

    Then just set the underline when you need it...

    EXAMPLE:
    .mycssclass a {text-decoration:underline}

    etc etc...

Topic Closed

This topic has been closed to new replies.

About this Topic