• Resolved timsig

    (@timsig)


    Hello,
    I’m having trouble getting a list of permalinks to respond to css styling i want to apply to them. They do so erratically/ selectively. In the example below, the default underline disappears, but the text does not appear white, as i want it to or change colour when hovered over. This is the code in question:

    <div id="FAQ">
    <h2>FAQs</h2>
    <?php if (have_posts()) : ?>
    <?php query_posts('catname=FAQ');
    while (have_posts()) : the_post(); ?>
    <h4 id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h4>
    <?php endwhile; ?>
    <?php endif; ?>
    </div>

    and this is the css:

    [code moderated as per forum rules - please use the pastebin or post a link to your site for acccess to the stylesheet]

    h4s only appear in this section of the site. If i add the pseudo selector :link to the selector of the penultimate rule, bizarrely the last item in the list gets the default underline (none of the others).

    Any help/pointers much appreciated.
    Tim

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    maybe a a:visited style is interfering.

    try and define a a:visited for your selection as well

    http://www.w3schools.com/CSS/css_pseudo_classes.asp

    Thread Starter timsig

    (@timsig)

    Thanks for the reply; I tried this, but no dice. What i don;t get is that if i alter the text size for the h4 tag in the stylesheet, it changes, but i can’t get the color to change.

    Michael

    (@alchymyth)

    the color is possibly on the h4 a style;

    sometimes it might help to use !important on the style;
    example:
    h4 a { color: #333!important; }

    also, the link styles might already been defined in connection with some higher css divs or classes.

    a link to your site pointing to a post/page with the problem might get you more replies.

    Thread Starter timsig

    (@timsig)

    Thanks for that. Unfortunately, I am developing the site locally, so can’t post a link. I think i have found the problem: I can’t help myself spelling colour correctly. Thanks for all your help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘styling permalinks with css’ is closed to new replies.