Wordpress sidebar pushed to bottom of page

I recently made a post in my other blog linuxtomacbook.com and noticed that the wordpress sidebar had disappeared. When I scrolled down to the bottom of the page I noticed that the sidebar was now all the way at the bottom after all the posts. I couldn’t figure out what the error was because I didn’t use any code in the post, I didn’t even have any special characters like a less than or greater than sign.

Inside the wordpress administration, I looked at the visual editor and couldn’t find anything again. It was time to look at the html itself. At first glance I didn’t notice anything different. After looking at the code for about 5 minutes and reading it line by line, the only thing that stuck out at me was an extra line the wordpress editor had put in. This line was sandwiched between a </p> and another div:

<div align=”left” />

Once I removed that line, everything went back to normal.

11 Responses to “Wordpress sidebar pushed to bottom of page”

  1. George Coghill Says:

    I am having the exact same issue. A recent post had an image that was too wide for the center column. When I fixed the width to fit, my sidebar got bumped to the bottom just as yours did. Deleting this post did not fix this.

    Which page did you find the HTML that was causing this issue? Mine only happens on the Home page, so I assume somehow the code got scrambled there (even though I have no idea how this could have happened).

    I noticed the footer on my home page is also not centering as it does on static pages and posts. Any help would be much appreciated, thanks!

  2. serge Says:

    George, This was so long ago that I don’t remember where that line was. What is the URL of the page that is doing this? I can take a look and see if I can take a look and maybe find something.

  3. WordPress Sidebar At Bottom Of Page: Div Tags Introduced Via Copy/Paste In Visual Editor | Cartooning & Illustration Blog: Coghillustration Says:

    [...] a thanks to Serge Madenian, his post on the ’sidebar at bottom’ issue led me to look into the div tag as a possible culprit. And although I found the problem in the [...]

  4. George Coghill Says:

    Serge - thanks for the quick follow up. I ended up tracking the error down, and put up a blog post of my own on how it happened and the fix: http://georgecoghill.com/blog/2008/11/08/wordpress-sidebar-at-bottom-div-tags-via-copypaste-in-visual-editor/

    In short, I had used copy/paste from the WordPress Visual Editor from a Page to a Post, and it had introduced div tags in the HTML. It happened on a post from a few days ago, and I hadn’t been to my home page for a while and therefore hadn’t noticed. I was looking at the wrong posts for the error.

    Your post helped me out by pointing me in the direction of looking for misplaced div tags. Thanks again for the quick follow up, much appreciated! I gave you some kudos and a link back to your blog (and this post) in my own post on my fix for issue as well.

  5. The Serge Is Working » Blog Archive » The Adsense Experiment: Day 1, 63 Cents! Says:

    [...] The Serge Is Working Things I’m working on, Things that interest me « The Adsense Experiment: Day 0, Setting Up The Blog [...]

  6. Ronnie Says:

    My sidebar appears at the bottom of posts only. I searched for unclosed div tags and could not find it in any posts.

    The problem doesn’t exist when I allow users to comment without registering.

    I’ve tried deactivating widgets one by one and that doesn’t fix the problem.

    It only goes away when I give users the ability to comment without registering. Otherwise if they click on a post page, the sidebar goes to the bottom and they get a message stating, “sorry you must be logged in to leave a comment.” Please help…

  7. serge Says:

    Hey Ronnie,

    Maybe if you link to your page that is having this issue, I can take a look at it and give you some advice.

    S

  8. Phoenix Patent Attorney Says:

    My sidebar appears at the bottom of the main blog site and also at the bottom of each individual post, leading me to believe it isn’t the standard problem.

    I’ve got my blog set up to align under the headline image by using a table - everything in the page is within the table. I thought this table structure might be causing the sidebar to fall to the bottom, but I removed all the table tags and it still falls to the bottom. I also thought that it might be the widgets in the sidebar, but I’ve tried several different combinations of widgets, and each one appears at the bottom.

    Any idea? - my site is linked to my name. Thanks!

  9. serge Says:

    Hi Tom Galvani,

    first of all, I like what you did there linking “phoenix patent attorney” to your site. Very good for your SEO.

    I checked out your site. It doesn’t seem like you have an errant div like the normal issue explained above. Your case seems more like bad design. Now, I’m not a CSS expert and I usually leave the design to professional graphic designers but as a software engineer I can dig through the code and figure things out. Here’s what I saw from your site. You have mixed tables and divs. It’s usually recommended to either do it all in tables or all in divs. If you are going to mix it, then at least wrap your middle well with an overall div and make that “float: left” and the sidebar div “float: right”. Something like that should fix your issue but you still may need to play around with the divs and the CSS to really get it to work the way you want to.

    Hope that helped.
    Serge

  10. Phoenix Patent Attorney Says:

    Yeah - thanks so much. I’ll get to work on it.

  11. Jenny Says:

    Thanks for your tip! I too had the same problem and found the culprit. - a missing tag. Now everything’s fine!

Leave a Reply

CAPTCHA Image Audio Version
Reload Image