• class=”st_tag internal_tag”

    I want to, let’s say, delete the underline in this class.
    Why does this css code:
    .st_tag .internal_tag a {
    text-decoration: none;
    }

    doesn’t cause any change in the appearance?
    thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • probably because you need more specificity?

    if there’s another setting in your stylesheet that has this, with another selector, it has more specificity, and therefore is given more weight.

    If something else in your stylesheet says something like “div.post .st_tag .internal_tag a” that *that* style will override yours, because it’s more specific.

    Thread Starter flapane

    (@flapane)

    Nope, first thing I did was to see if css had any st_tag internal_tag or so.
    Thanks.

    p.s
    gotta love your layout design and that “If I don’t know the answer, then I will find it for you.” from a movie that I love.

    What’s the underline on? Links?

    Thread Starter flapane

    (@flapane)

    yes.
    I want to chamge the color and/or the underline, I’ll decide next, but either use any kind of attribute it’s the same, so I pasted the text-decoration version.

    Find the CSS declaration that sets the default content link style first. It should look something like:

    #content a {color:red;text-decoration:underline}

    Then try amending your new CSS to extend the specificity:

    #content .st_tag .internal_tag a {text-decoration: none;}

    Thread Starter flapane

    (@flapane)

    content id doesn’t actually have any a because my blog follows the link rule from my main site css:

    a:link {
    color: #ffffff;
    }
    a:visited {
    color: #ffffff;
    }
    a:hover, a:active {
    text-decoration: none;
    color: #0099FF;
    }
    a:active {
    color: #ffffff;
    }

    So blog css says only
    #content {
    float: left;
    width: 78%;
    }

    and I added
    #content .st_tag .internal_tag a {text-decoration: none;}

    but nothing changed (https://www.flapane.com/blog/).

    In that case, I suggest you edit your theme files and add a class to the link you want to style and than add that to your blog CSS.

    If you posted a link to the site in question, it would be a lot easier than guessing – seeing it always makes hings easier ??

    (and thanks for the compliment ?? )

    Thread Starter flapane

    (@flapane)

    @esmi
    I am supposed to read a developers guide for wordpress in order to find out how to add a new class fot “that” kind of link, I would leave this option as latest one ??

    @doodlebee
    Yes, I have written it 2 posts up (flapane.com/blog)

    Thread Starter flapane

    (@flapane)

    up

    Which link is it that you want to change?

    Thread Starter flapane

    (@flapane)

    those part in the posts that become automatically links pointing to one of my tags.
    They are represented by “st_tag internal_tag”

    first off, your *link* has the class of “internal tag”, but your stylesheet says this:

    #content .st_tag .internal_tag a

    that’s looking for a link *within* internal_tag. it should be:

    a.internal_tag – wrong specificity.

    Secondly, “st_tag” and “internal_tag” are two *different* classes. So it’s *either* “a.st_tag” or OR “a.internal_tag”. If you want BOTH, then you have to write it “a.st_tag.internal_tag” – although why you’d want to do that is beyond me.

    Thread Starter flapane

    (@flapane)

    Is beyonde me too, because I went into modifying a not-my-own theme, and the source code said:
    <a href=”https://www.foo.com/blog/tag/script/&#8221; class=”st_tag internal_tag” rel=”tag” title=”bar[…]

    So I tought that I must have something like
    .st_tag .internal_tag a {…} because there were two classes for that kind of link.
    I always wrote *.class attribute*, but it seems that in this case I needed *attribute.class*!
    Doing a.st_tag {text-decoration: none;} has finally fixed my issue, as you can see.
    Thank you so much for your help.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘css class not changing…’ is closed to new replies.