WordPress.org

Support

Support » How-To and Troubleshooting » Sidebar is showing up at the bottom of page on single.php

Sidebar is showing up at the bottom of page on single.php

  • on www. careerpotential.com/blog/how-to-deal-with-annoying-co-workers-part-2-of-2/, for example, the sidebar is at the bottom of the page.

    i’ve played around with the various margins, etc. but can’t get it to show at the top next to the post.

    any suggestions? or tips?

    thanks!

Viewing 15 replies - 1 through 15 (of 17 total)
  • Samuel B
    Participant

    @samboll

    FishDogFish
    Member

    @fishdogfish

    #sidebar
    {
    padding: 20px 0 10px 0;
    margin-left: 545px;
    width: 190px;
    }

    All that left margin is bound to break the layout.

    Get rid of the left margin and float the sidebar left.

    Change it to.

    #sidebar
    {
    padding: 20px 0 10px 0;
    margin-left: 5px;
    width: 190px;
    float:left;
    }

    I took and look and not completely sure. After cleaning up the errors, if you are still having problems, here are my thoughts:

    1. If you are using widgets, try turning them off and see how the default code appears.

    2. Try widening your main column and if that doesn’t work try changing the nested div order and see the results.

    Hope that helps

    Thanks for the feed back and tips.

    As far as the errors – really appreciate that link. I looked through the errors and tried to find them within my php files, but can’t seem to locate them.

    How/where do you go to fix them?

    I can identify the problems in ‘view source’, but where within my WP files do i go to fix them?

    any suggestions would be greatly appreciated…

    Samuel B
    Participant

    @samboll

    the major problem is in theme’s header.php looks like

    thanks for pointing me in the right direction….

    hate to admit, i’m still a bit lost… still dont see those errors in the header.php file.

    Samuel B
    Participant

    @samboll

    for one thing, validator shows head tag way too late – like maybe it was moved?
    usually <head> is in header.php soon after DOCTYPE declaration

    FishDogFish
    Member

    @fishdogfish

    Those errors aren’t what’s breaking your layout.

    The extra 545 pixels on the left side of your sidebar is what’s breaking the layout.

    I’d fix that before digging around in the php files, because more than likely it’s a plugin or something causing the validation service to throw errors.

    thanks for the tip…

    i dont see, though, where the 545 pixels are… i searched the style.csc and can’t find it.

    can you tell me where it is that i need to make a change?

    thanks again for the help!

    FishDogFish
    Member

    @fishdogfish

    If my help isn’t appreciated I won’t offer it to you anymore.

    Sorry if i some how offended you…

    i had thanked you twice in my post and i meant it sincerely… i really do appreciate your help… not sure what i said wrong.

    anyways, all i was asking is where to find the setting where i could change the 545 pixels… i looked but wasnt able to find it.

    FishDogFish
    Member

    @fishdogfish

    Here, read This

    Hi again…

    I had tried that and it’s still not quite right. The coding you suggested stated “float: left”, which I changed to right so that it would be on the right hand side.

    It’s still down below the content.

    I’ve been able to fix similar problems before on other themes… dont know why this one is giving such trouble.

    thanks again for your time, appreciate it.

    FishDogFish
    Member

    @fishdogfish

    I forgot to mention, you probably need to float the content div left also, that way both will be side by side.

    Something you can check is the width of your container div, the one that holds your content and sidebar divs, and make sure that it’s big enough to hold the width of the content div and the sidebar added together.

    If it’s not you can enlarge the container, or adjust the content and/or sidebar div/s to fit in the container.

    Don’t forget to include any left and right margin that is set on the content and sidebar, also check for padding on the container. Normally wouldn’t expect that, but since the sidebar had 545 pixels of margin on it I’d be suspicious of the other divs.

    FishDogFish
    Member

    @fishdogfish

    Find this div

    .widecolumn {
    padding: 10px 0 20px 0;
    margin: 5px 0 0 20px;
    width: 450px;
    }

    And try changing it to

    .widecolumn {
    padding: 10px 0 20px 0;
    margin: 5px 0 0 20px;
    width: 450px;
    float:left;
    }

    Also make sure you float the sidebar left, and remove the left margin.

    They should line up side by side.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Sidebar is showing up at the bottom of page on single.php’ is closed to new replies.