• Hi,

    below is my index.php that has been tweaked following the tutorial on Urbangiraffe. I am sure I am doing something crazy and have tried looking long and hard what is up, now I call upon the wiser monkeys in here to assist (please).

    Have the following index.php…

    <?php get_header(); ?>

    <div id=”wrapper”>
    <div id=”content” class=”narrowcolumn”>

    <?php if (have_posts()) : ?>

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

    <div class=”post”>
    <h2 id=”post-<?php the_ID(); ?>”><a href=”<?php
    the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php
    the_title(); ?>”><?php the_title(); ?></h2>
    <small><?php the_time(‘F jS, Y’) ?> <!– by <?php
    the_author() ?> –></small>

    <div class=”entry”>
    <?php the_content(‘Read the rest of this entry »’); ?>
    </div>

    <p class=”postmetadata”>Posted in <?php
    the_category(‘, ‘) ?> | <?php
    edit_post_link(‘Edit’,”,’|‘); ?> <?php
    comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘%
    Comments »’); ?>

    <!–
    <?php trackback_rdf(); ?>
    –>
    </div>

    <?php endwhile; ?>

    <div class=”navigation”>
    <div class=”alignleft”><?php posts_nav_link(”,”,’«
    Previous Entries’) ?></div>
    <div class=”alignright”><?php posts_nav_link(”,’Next
    Entries »’,”) ?></div>
    </div>

    <?php else : ?>

    <h2 class=”center”>Not Found</h2>
    <p class=”center”><?php _e(“Sorry, but you are looking for
    something that isn’t here.”); ?>
    <?php include (TEMPLATEPATH . “/searchform.php”); ?>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>
    </div>

    Doesn’t validate but “works” in that the footer stays in the wrapper as intended.

    IF I sling the final </div> above the second last line it validates but the footer hops out the wrapper and goes hard right.

    What gives people? (CSS available if needed).

    Many thanks in advance for any help offered.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you tried moving the final </div> up below the sidebar call and putting the footer in it’s own <div>?

    <div><?php get_footer(); ?>
    </div>

    Thread Starter daysofspeed

    (@daysofspeed)

    Yep – if I understood you correctly – but it failed.

    This “works” (ie gets the footer back into the wrapper)

    </div>

    <?php get_sidebar(); ?>

    <div><?php get_footer(); ?>
    </div>
    </div>

    But it fails validation:

    Please, validate your XML document first!

    Line 272

    Column 5

    The element type “div” must be terminated by the matching end-tag “</div>”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Kubrick tweak leads to wrapper madness’ is closed to new replies.