WordPress.org

Ready to get started?Download WordPress

Forums

Strange div error please help (8 posts)

  1. incubu8981
    Member
    Posted 3 years ago #

    Hello everyone,

    I Hope you can help me out here. Below I have listen to links to pages on a site I am working on and this has literally eaten me alive. The two pages are using all the same templates loops everything so to me there is no reason why this is malfunctioning. The problem is that some how a certain number of posts on these pages causes the content to extend underneath the footer. In the source code it says that the footer tag is inside of the content tag. I have looked everywhere and have not found anything.

    As you see on the third link everything is fine, and should be using the same templates and everything. I have run the validation and yes a boat load of errors, many of which are td style errors which I will correct and use css instead for them but there are a few unclosed div element errors which make no sense to me as they are closed. This however is causing the entire problem but does not actually reflect in the code..
    Oh, I should mention all of these pages are just category listings.
    help!

    (has problem)

    (works fine)

  2. incubu8981
    Member
    Posted 3 years ago #

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

  4. incubu8981
    Member
    Posted 3 years ago #

    haha yea, the number of posts seems to be the trick, I was able to unpublish 3 posts to the "walk-behind-sweeper" page and it worked fine.. I just tried the search page and same thing..mmmhm :/

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    if the number of post is coausing the problem, check if there are unbalanced opening <div ...> and closing divs </div> (i.e. more of one than the other) in the loop part of the code.

  6. incubu8981
    Member
    Posted 3 years ago #

    yea, I've been searching. looked again through all the loop pages and nothing, well at least I don't see it

    [code moderated as per forum rules - please use the pastebin]

    If you feel like looking please do! haha.. those are the 4 loop pages I have I pretty much only added the section with the table's and the conditional statement around it

  7. incubu8981
    Member
    Posted 3 years ago #

  8. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    in here http://pastebin.com/zWyviw3d

    one of the closing divs is in a part of a conditional statement, so the display depended not on the number of posts, but on the existence of galleries.

    this area (from line 215):

    <hr style="margin-top:15px;"/>
    
    </div>
    
    <?php endif; ?>

    change to:

    <hr style="margin-top:15px;"/>
    
    <?php endif; ?>
    
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic