• Resolved srotherham

    (@srotherham)


    Hi guys,

    I want to style the href’s produced by <?php the_category(', ', '', '') ?> I’ve tried wrapping the tag in a span, like so <span class="mini"><?php the_category(', ', '', '') ?></span> but to no avail. The links that are being out putted are only following the default CSS instead of `a.mini:link, a.post-edit-link:link {
    font-weight : normal;
    text-decoration : none;
    }

    a.mini:visited, a.post-edit-link:visited {
    font-weight : normal;
    text-decoration : none;
    }

    a.mini:hover, a.post-edit-link:hover {
    font-weight : normal;
    text-decoration : none;
    }

    a.mini:active, a.post-edit-link:active {
    font-weight : normal;
    text-decoration : none;
    }`

    Any help you be much appreciated,
    Stephen

Viewing 2 replies - 1 through 2 (of 2 total)
  • WP Voyager

    (@mindblender-3d)

    I think the CSS designators are not quite right. If you want to call the <a> (anchor tag) inside that span, it should look like this:

    .mini a

    Not like this:

    a.mini

    The class which contains the link in question should be referenced first, and because there is a space between the elemens (and no comma), CSS interprets this to mean “style all links inside the .mini class like this:”

    Same goes for all the succeeding pseudo-classes for rollovers, visited links, etc.

    I hope this works for you,
    MindBlender 3D

    Thread Starter srotherham

    (@srotherham)

    Ah! Brilliant thank you very very much! I can’t believe I’d been that stupid lol.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘styling the_category’ is closed to new replies.