WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Footer moves to the left/right (8 posts)

  1. TheIconoclast
    Member
    Posted 8 years ago #

    My site is http://wordpress.theicono.com/
    My CSS sheet is at http://theicono.com/wordpress/wp-content/themes/iconoclast/style.css

    For some reason, the footer moves too far to the right or left, and it varies from page to page. In the home page and single post page, it's moved too far to the left. In the About page, it's moved too far to the right. I have no idea what's going on. I've tried floating the footer div to the left, and even adding margins to negate the space, but it doesn't work.

    Thank you very much for reading. Any help or suggestions appreciated.

  2. Ryan Fitzer
    Member
    Posted 8 years ago #

    Take out the Float and Width property and then give the #footer a background-color:red, #container a background-color:blue and your #page a background-color:green. This will make apparent which divs are which and more importantly, show you what the footer's parent containter is on each page. The problem is that the footer is located in a different parents on each page so one general css rule won't do the trick unless the footer is in the same parent consistantly thoughout the site.

  3. TheIconoclast
    Member
    Posted 8 years ago #

    After multiple edits, I've deduced that the About page is working as it should. The parent, for the About Page, is #page.

    In the other two, however, #content is the parent. Why would this happen? How would I go about fixing it?

    All the pages have the <?php get_footer(); ?> at the end, so shouldn't they be consistent?

    {Last edit, promise!}

  4. Ryan Fitzer
    Member
    Posted 8 years ago #

    You just need to put <?php get_footer(); ?> in the same parent in all the template files that use it.

  5. TheIconoclast
    Member
    Posted 8 years ago #

    I have done that. Here's how my pages are outlined:

    #page
    [header]
    #container
    [main-stuff]
    /container
    [footer]
    /page

    The <div id="page"> and header are in the header.php file. The footer and the </div> for #page are in the footer.php file. My template files just contain a <?php get_header(); ?>, the container/main-stuff, and then a <?php get_footer(); ?>.

    The div for #content starts and ends in the template pages, so I don't see how it can affect the footer.

    Thanks for the replies, by the way. I really appreciate it. This whole thing has me stumped.

  6. moshu
    Member
    Posted 8 years ago #

  7. TheIconoclast
    Member
    Posted 8 years ago #

    Great link. I know of the WC3 validator, but I always tried it on the Index.php page and received a message without much elaboration. Thank both of you so much for your help.

  8. moshu
    Member
    Posted 8 years ago #

    The explanation why you didn't see anything on validator... is here:
    http://wordpress.org/support/topic/81148?replies=12#post-417765

Topic Closed

This topic has been closed to new replies.

About this Topic