Endwhile statement ruining footer layout
-
I have a problem with my site, where my header and footer are supposed to expand the width of the page, but the content is suppose to be within a 960px container. The header displays no problem, as well as the footer…on most pages. On my index page, the footer doesn’t display the entire width like it is suppose to, it thinks its nested within the container margin of 960px, and I have no idea why (I checked to ensure all divs, etc were closed, and they are). I narrowed it down the <?php endwhile; ?> statement towards the end.
Basically, if I remove the <?php endwhile; ?> out of the container div, the footer displays fine, but then the blog posts are all messed up and no longer in proper order.
The code follows the basic structure
<?php get_header(); ?> <div id="container"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> //Content here <?php endwhile; ?> </div> <?php get_footer(); ?>
But, if I change the code to something like
<?php get_header(); ?> <div id="container"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> //Content here </div> <?php endwhile; ?> <?php get_footer(); ?>
It will work, but all the posts will be jumbled up and out of the container, etc. It’s just a big mess.
Any help would be greatly appreciated.
-Rally
- The topic ‘Endwhile statement ruining footer layout’ is closed to new replies.