WordPress.org

Ready to get started?Download WordPress

Forums

CSS can't set link color (11 posts)

  1. joelwalsh
    Member
    Posted 8 years ago #

    I am trying to set the color of the link for the title of the blog, but in both Firefox and IE it keeps doing its own thing:

    http://upmarketmerchant.com/

    I'm trying to do this using a span class (sitename).

    Any ideas why it's not working?

  2. Beel
    Member
    Posted 8 years ago #

    .sitename a {color: blue; text-decoration: none;}

    works

  3. joelwalsh
    Member
    Posted 8 years ago #

    that's what I'm doing now, and it's not working

    CSS:

    .sitename {padding-left: 15px; font-size: 22px; font-family: Georgia, Times, "Times New Roman," serif; color: #efefef;}
    .sitename a {color: #efefef; text-decoration: none;}
    .sitename a visited {color: #efefef; text-decoration: none;}

    implementation:

    <div id="logobox" style="background-image:url(http://upmarketmerchant.com/wp-content/themes/upmarket-merchant-credit-card-3-col/image001.gif); position:absolute; top: 0px; left: 0px; width: 775px; height: 50px; border: 0px; padding: 0px; margin: 0px;">
    <span class="sitename">UpMarket Merchant</span>
    <span class="description">Credit card merchant services, credit cards processing, internet merchant service</span>
    <span class="topright" style="position:absolute; top: 10px; right: 0px;">
    </span>
    </div>

    Site is at:

    http://upmarketmerchant.com

    CSS is at:

    http://upmarketmerchant.com/wp-content/themes/upmarket-merchant-credit-card-3-col/style.css

  4. joelwalsh
    Member
    Posted 8 years ago #

    any thoughts yet on this one?

  5. schestowitz
    Member
    Posted 8 years ago #

  6. Minna
    Member
    Posted 8 years ago #

    Those styles don't differ, really, so you wouldn't see if it works or not. But that .sitename a visited should be .sitename a:visited (or .sitename a:hover or .sitename a:active)

    Hope this helps :)

  7. moshu
    Member
    Posted 8 years ago #

    Actually it doesn't make much sense to have a "visited" for the blog title - it will always apply that color.

  8. joelwalsh
    Member
    Posted 8 years ago #

    Thanks for the advice--moshu, why will it always apply that color? Wouldn't the default visited color override it?

  9. moshu
    Member
    Posted 8 years ago #

    Nope, it's the other way around. The "general" rule is ovwerriden by the specific rule.
    On the other hand I questioned the whole idea of having a "visited" colour for the title of the blog. It is useful for internal links to keep track which pages, posts, categories, whatever I have seen on the site, but why for the main title? Since I am on the site - it will always show me as a "visited" link. So, what's the functionality of it?

  10. joelwalsh
    Member
    Posted 8 years ago #

    Minna, that solved it (I think). Thanks, you're a life-saver.

    Frankly, I don't think that CSS validator tool can be worth very much if it hasn't heard of the Trebuchet font. Sometimes those things are a little too orthodox.

  11. moshu
    Member
    Posted 8 years ago #

    It recognizes if you don't put it in between ".
    trebuchet, arial, 'Times New Roman', sans-serif

    You should use comma between font names and use single quote ['] for font names with more than one word.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags