centering container with left sidebar

  • htteo9

    #4934

    Hi there, am not a techie but would to center the container (2 coloums with leftside bar). The closest code I found is

    #container {
    float: left;
    margin-left: 25px;
    }

    I used 25px because it aligned center to my tablet. So, is there a way I center the container on all browsers and devices (laptops, desktops and tablets)?

    Admin

    Syahir Hakim

    #29964

    The container should be centered by default. If it’s not, something else is messing with the layout. Try deactivating all plugins and see if the container is centered.

    Also, I noticed that there’s inline styles for the <body> element that’s setting the width of the body to 290px and height to 170px. Find what’s adding this inline style to the body element and you’ll find your root cause.

    htteo9

    #29965

    Tried deactivating all plugins and it doesn’t center the container. But if I chose one-column, it does center by itself.

    On the <body> element, I tweaked the settings to accommodate the photo I tried to put in a widget box. I have also tried removing the widget box, but it does not also center the container. Please advise.

    Admin

    Syahir Hakim

    #29966

    It’s centered now. Try clearing your browser cache if it isn’t.

    htteo9

    #29967

    oh yes…. I found the root by removing all html in the widgets…. thanks for the help! by the way, great theme!

    Mod

    Kenneth John Odle

    #29968

    Marking thread as resolved. You can do this yourself as well.

Viewing 6 posts - 1 through 6 (of 6 total)

  • You must be logged in to reply to this topic.