• Resolved lectique

    (@lectique)


    Hi there,
    I know there are a bunch of specific threads about wp_list_pages out there but I couldn’t find the answer to this particular problem yet…

    So I have my sidebar-as you would, and I have some pages that are being listed. The headline to the pages section I have hardcoded into the code:
    <div class="blueboxheadline">About Us</div> because I wanted to have the headline in a different “box” than the page list which pops up. I made a new CSS class for the actual page listing:

    .bluebox {
    text-align:left;
    width:200px;
    height: auto;
    border: 2px solid #000000;
    margin-left: 10px;
    margin-top: 5px;
    }

    Which should, in theory, just display the page listing in a simple box. works fine in firefox-but not in IE-the box is just a tiny box with no content. It doesn’t seem to matter how i change the stylesheet (experimenting with width, height, padding etc) IE refuses to display the list of pages within the div tag. I’ve tried using span instead of div, which makes format each page item differently. Any other tag doesn’t seem to help either. I think it might have something to do with the way WP formats the list of pages but I don’t really know. Has anyone got any ideas? This shouldn’t be so hard. Here some screenshots so you know what I’m talking about. I don’t care that the font is too small etc at the mo, I just want the damn text to display in the box on IE, grrrrrrrr.

    Firefox is perfect as usual:
    https://www.pccstudentlife.org/temp/firefox.gif

    IE is dodgy as usual:
    https://www.pccstudentlife.org/temp/IE.gif

    This is the code inside the page:<div class="blueboxheadline">About Us</div>
    <div class="bluebox"><?php wp_list_pages('title_li='); ?></div>

    any ideas? I’ve been working on this for frickin’ ages…and it’s not getting better!

    eta: if anyone had a link to/name of a theme that has the pages “headline” and the pages “list display” in different divs, so i can check out the code, that would help too. Thanks so much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The only thing I see is the height: auto; you do not need this, try it without it.

    Thread Starter lectique

    (@lectique)

    ah, sometimes even just posting about a problem helps. I fixed it. Basically IE does not like the way WP formats the list output. I found if I changed this line (line 427) in the file template-functions-post.php:


    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '" title="' . $title . '">' . $title . '</a>';
    in my WP build (2.0.5) with the following:

    $output .= $indent . '<a href="' . get_page_link($page_id) . '" title="' . $title . '">' . $title . '</a><br>';

    Both firefox and IE display the links perfectly-inside the box. Strange…

    Thread Starter lectique

    (@lectique)

    hi muelheim, i posted my fix before I saw your reply but I had tried putting in a static pixel value before and it made no difference: the box was the correct size but the text was outside of it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_list_pages vs. CSS vs. IE’ is closed to new replies.