Endwhile messing up footer

Hey,

I’m having a little problem with my design. Basically, the container div is set at 960px, but the footer and header (They are ssi files included in the page) are meant to expand the entire width of the page. The header expands no problem, but the footer seems to be contained within the container div, even though it is not within it (I checked to make sure every div, etc had been closed). This problem only appears on the one page, because every other page it seems to go the entire width of the page no problem.

I narrowed down the problem to an endwhile statement that seems to be messing up the layout. Right now the endwhile is within the container div, but if I move it out, the footer expands the way it should, but then the layout of the container gets jumbled up.

I don’t know how to correct this, but I know it is an issue with the endwhile statement and it’s placement.

Elementax

Can you post the code?

Sure, here you go. This is the page with the error


<?php get_header(); ?>

<div id="content-container">

<?php get_sidebar(); ?>
<div id="content-container-inner">
    <div id="index2">
        <div id="index-container2">
                    <div id="newsheader">
                        <img src="images/newsheader-img.png" />
                    </div>
                    <div id="divider">
                        <img src="images/divider-long.png" />
                    </div>
        </div>
    </div>
        <?php
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args= array(
	'cat' => 1,
	'paged' => $paged
);
query_posts($args);

		 ?>
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div id="index">
    <div id="index-container">
        <div id="latestnews">

            <div id="postingtitle">
                <div id="newsposting">
                        <div id="commentbubble">
                            <div id="bubbletext">
                            <a href="#"><?php comments_popup_link('0', '1', '%'); ?></a>
                            </div>
                        </div>
                            <h1><a href="<?php the_permalink() ?>"><?php if (strlen($post->post_title) > 40) {
            echo substr(the_title($before = '', $after = '', FALSE), 0, 40) . '...'; } else {
            the_title();
            } ?></a></h1>

                </div>
                    <div id="details">
                    <p><?php include (TEMPLATEPATH . '/inc/meta.php' ); ?></p>
                    </div>
            </div>

            <div id="newscontent">
            <p><?php echo content(70); ?></p>
            </div>
            <div id="readmore">
                <a href="<?php the_permalink() ?>"><img src="images/readmore.png" alt="morenews" /></a>
            </div>

    	</div>
    <img src="images/divider-long.png" />

    </div>
    <?php endwhile; ?>
    <?php if(function_exists('wp_paginate')) {
            wp_paginate();
        } ?>
    <?php endif; ?> <?php wp_reset_query() ?>
    </div>

</div>
</div>

<?php get_footer(); ?>

You have one more opening div tag than closing tags there. The easiest thing would be to validate your page, so that you can work out exactly which is the tag that’s not needed.

I already tried validated and fixing the errors, but nothing helped. I still get the same issue.

Hm, I must have miscounted. Anyhow, can you post a link to the page? Otherwise we can only theorize. It’s nothing to do with PHP, because PHP doesn’t reach the browser. There’s might be an error up the page that is throwing everything out.

The site isn’t up yet, all testing is being done locally with wamp so I can’t provide a link, hopefully soon however.

You could just copy the page’s rendered HTML (and CSS too) and post that here. Then we can test it.