WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Space in Page List (15 posts)

  1. puremood
    Member
    Posted 8 years ago #

    Hi.

    I searched but didn't see the answer (hope I didn't miss it).

    Anyway... on my sidebar I have my page list. They all appear correctly except for the last one. There is a space before the last main page.

    If you look you'll see it active on my site (after military links and before glitter name tags)

    If someone knows how I can remove that space, I'd appreciate it. It slightly irks me ;)

  2. puremood
    Member
    Posted 8 years ago #

    Anyone?

  3. estjohn
    Member
    Posted 8 years ago #

    most likey because you have about 98 errors of broken elements, elements left out and other problems with the code...

    http://validator.w3.org/check?uri=http%3A%2F%2Fjustpuremood.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1

    that is not xhtml valid either with errors...

    fix a lot of that and most likely itll be fixed

    a nice way of doing it is getting the html tidy plugin for firefox and checking your pages with it.. that will give you a start. though its html and not xhtml.. as i said itll give you a start. via tidy, youhave 100 warnings and no errors.. but that translates to 98 xhtml errors

  4. puremood
    Member
    Posted 8 years ago #

    I knew I had errors... *sigh*

    But for this single issue I wasn't sure why it was happening... As I have multiple skins/layouts and I don't have the space on the other layouts just this one. I know HTML but am new to learning all the XHTML/CSS/PHP, etc...

    I'll figure it out, eventually (I hope). I thought perhaps someone may be able to help me by pin-pointing the problem when I posted this a couple days ago.

    Thank You for your reply.

  5. estjohn
    Member
    Posted 8 years ago #

    <li class="page_item"><a href="http://justpuremood.com/?page_id=151" title="Life in the Navy">Life in the Navy</a><ul>

    <li class="page_item"><a href="http://justpuremood.com/?page_id=325" title="Military Links">Military Links</a></li>
    </ul>
    </li>

    <li class="page_item"><a href="http://justpuremood.com/?page_id=294" title="Glitter Name Tags">Glitter Name Tags</a>
    <ul>

    are probabally where you problems will be
    -------------------------------------------------
    close the <li> before you open the <ul>

    <li class="page_item"><a href="http://justpuremood.com/?page_id=151" title="Life in the Navy">Life in the Navy</a></li><ul>

    remove the extra </li>
    <li class="page_item"><a href="http://justpuremood.com/?page_id=325" title="Military Links">Military Links</a></li></ul>

    same thing here, close one before you open another
    <li class="page_item"><a href="http://justpuremood.com/?page_id=294" title="Glitter Name Tags">Glitter Name Tags</a></li><ul>

    then remove the extra one at the bottom
    <li class="page_item"><a href="http://justpuremood.com/?page_id=319" title="Military/Patriotic Tags">Military/Patriotic Tags</a></li></ul></ul>

  6. puremood
    Member
    Posted 8 years ago #

    The code I am using to call my pages:

    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>

    So, I don't see all the things you see by viewing source. So, I'll look stupid and admit I'm not sure where to go change that.

    Again, thank you for your reply. I appreciate it.

  7. estjohn
    Member
    Posted 8 years ago #

    Nah, you dont look stupid. I cant see what you are looking at so I do not know what you see to change.. Im sorry :( I wish I knew a better way to help you, I would!

    I could be way off base too.. so there might be a better way.

  8. puremood
    Member
    Posted 8 years ago #

    No problem. Thanks for trying! :)

  9. kappaluppa
    Member
    Posted 8 years ago #

    I don't know if you found a solution yet, but the problem lies in the fact that FOR SOME UNKNOWN REASON wp adds two classes when using the php wp_list_pages template tag:
    It adds class="page_item
    and
    current_page_item

    And when it lists child pages using the page_item class it puts the closing tag for the parent pages in the wrong place, as estjohn said.

    I'm trying to modify the template-functions-post.php (the only place I could find the page_item function) page,but so far to no avail!

    I have no idea why WP needs to add those classes. I've specified formatting for them in my CSS, but because that closing tag is in the wrong place it doesn't work.

    I've spent HOURS UPON HOURS working on this, so if any one has an idea I SURE WOULD APPRECIATE IT!!!!

    KATHY

  10. niziol
    Member
    Posted 8 years ago #

    The reason is hardly unkown - it only adds the curent_page_item attribute to the page your currently on, so it's easy to style the active link, like say you are visiting the "about me" page, so this would be reflected by making "about me" bold, to indicated that is the page you're on. The wp_list_pages has configurable options, just read the codex page and you can customize it.

    Even if you leave it as is, as long as there is not class defined in your style sheet for the current_page_item, then it will do nothing.

    Good luck,
    Michael.

  11. kappaluppa
    Member
    Posted 8 years ago #

    Ok, I can see the possibilities. However, I'm getting a big space between the child pages and the parent pages.

    Check out my page: http://kappaluppa.com/TechServ/
    actually, check out the ss of the wacky menu, as I'm working on the page and it may not have the same problem when you look at it: http://kappaluppa.com/TechServ/ssofwackymenu.jpg

    ----

    here is the source:
    <!-- begin sidebar -->
    <div id="menu">

    <li class="page_item">Home

    <li class="page_item">Services

    <li class="page_item">About
    <li class="page_item">Contact Us
    </div>
    <!-- end sidebar -->

    ----------------

    It seems the closing tag for the one page that has child pages has the closing in the wrong place.

    thanks for the encouragement.... {sigh}

  12. niziol
    Member
    Posted 8 years ago #

    You can adjust the spacing by tweaking the padding and/or margins in the style sheet. I think you're missing a ul tag, according to the validation results you have 12 errors in your code. Go through that and fix those and it may help clear up the problem.

    If your still having issues after fixing the errors and adjusting your style sheet, post back here.

    Good luck,
    Michael.

  13. kappaluppa
    Member
    Posted 8 years ago #

    Guess what... I tweaked it to work in FF - sorta, but NATURALLY, it does not work in IE... YET!

    I have faith!

  14. kappaluppa
    Member
    Posted 8 years ago #

    Update....
    I went through the whole validation process...
    first time actually. yes. shame on me. It was quite a learning experience.

    Anyway, got most of the errors out of it. Now, the one error left looks as if it coming from the wp_list_pages template tag.

    Got my menu lines mushed together like they should be, but I can't get IE & FF to play nice with margins & padding. Guess that is a subject for anotheer thread...

    thanks so much for helping me out (i'd be happy to hear what you have to say about the margins, padding, debate. Thanks!)

    Signed,
    a much calmer Kathy

  15. niziol
    Member
    Posted 8 years ago #

    IE can be very frustrating, see this post, it's probably not the best solution, but it works for me and it kept me from banging my head on the desk!

    I think you need to add a <ul> right under the <div id="menu"> tag, that's the only remaining error on your page. Give that a try and see how it works.

    Cheers,
    Michael.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags