Wordpress side bar is now at the bottom of the web page

5 replies
I have no clue what I did. My side bar is now at the bottom and it's like this for all the different templates that I have. The link is rememberwethepeople.com

I did a search on this but nothing really made any sense to me. any help will be appreciated.

Lionel
#bar #bottom #page #side #web #wordpress
  • Profile picture of the author Lionel Turner
    I narrowed it down to one post that is causing this to happen and its my last post. It seems like maybe something is too big. Any ideas?
    {{ DiscussionBoard.errors[2503173].message }}
  • Profile picture of the author Marc Quarles
    Hi Lionel,

    You have the sidebar div contained within the content div.

    Here's part of your site structure (this is very simplified):

    <div id=wrapper> (this is the main div for your site, everything else is contained within it)

    <div id=content> (all of your blog posts are inside this div, it is defined as float:left)

    <div id=sidebar> (contains your sidebar widgets ,etc)
    </div> (end of the sidebar div)

    </div> (end of the content div)

    </div> (end of the wrapper div)


    As you can see from the above, the sidebar div is inside the content div, and since the content div is float:left and defined as 540px wide, your sidebar is on the right-hand side of your content div, but there is no room there, so it gets knocked down to the bottom.

    The "correct" way to fix this would be to move the sidebar div outside of the content div, but still within the wrapper div, like this:

    <div id=wrapper> (this is the main div for your site, everything else is contained within it)

    <div id=content> (all of your blog posts are inside this div, it is defined as float:left)
    </div> (end of the content div)

    <div id=sidebar> (contains your sidebar widgets ,etc)
    </div> (end of the sidebar div)

    </div> (end of the wrapper div)


    By doing this, the sidebar div won't be inside the content div, and it should float to the right as intended. This kind of thing is caused by getting confused with the ton of closing div tags that are usually found at the bottom of a page... it looks like someone accidentally deleted one or inserted one in the wrong place.

    Here's a screenshot of your site with the divs outlined in blue and red - the sidebar is clearly inside content div.

    TechSmith | Screencast.com, online video sharing, 2010-08-22_1533

    If you open up your site template and match up the opening divs with the closing divs, you should be able to see where the problem is and get it fixed.

    Marc
    {{ DiscussionBoard.errors[2503213].message }}
    • Profile picture of the author Marc Quarles
      We were posting at the same time - if your post has a </div> in it that is screwing with the template divs, then that could do it.

      If you unpublish your last post, do things go back to normal?
      {{ DiscussionBoard.errors[2503217].message }}
  • Profile picture of the author Marc Quarles
    I agree it's your latest post - the others, when going to the post page, display the sidebar properly. Your latest post, when clicked through to the post page, has the same sidebar issue.

    Take a look at the post in question and match up all the <div> tags with </div> - make sure there's the same number of each.

    Marc
    {{ DiscussionBoard.errors[2503228].message }}
  • Profile picture of the author Lionel Turner
    Thanks you Marc!


    Lionel
    {{ DiscussionBoard.errors[2503251].message }}

Trending Topics