Support » Fixing WordPress » Background img in wp_list_pages

  • silfver



    I have a weird problem.

    In my sidebar.php-template I have this code:
    <?php wp_list_pages('title_li=<h2>' . __('Undersidor') . '</h2>' ); ?>

    And in my header.php-template file i have this code:
    <?php wp_list_pages(); ?>

    In the latest code it only prints out the pages in a
    < li >. Perfect. Exactly as I want it.

    This is how my CSS looks like for the Current item:
    .current_page_item {
    background: url(img/menu-hover.gif) no-repeat bottom;
    font-weight: bold;
    color: #000;

    But in some strange way the background image doesn’t show up in the menu in my header, but I can see it in the sidebar template. How come?

    I’ve tried using a full image link, but it still doesn’t show up.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • silfver


    Hm. Funny. If I add position: absolute; to the CSS the background image appears.

    So it seems to be something wrong with my CSS, I guess.

    Any ideas?



    I solved it.

    I had to move the $css_class in template-functions-post.php-file.

    Works fine now.

    But if anyone reads this, is it possible to do so I get a code like this instead:

    <li ><a href="link"></a></ li>

    Instead of:

    <li ><a href="link"></a></ li>

    both lines are the same?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Background img in wp_list_pages’ is closed to new replies.