Ready to get started?Download WordPress


Image on left, main content to its right (6 posts)

  1. nikhip
    Posted 2 years ago #

    I'm using the WordPress Twenty Eleven theme, and have a logo I'd like to run down the left side of the page, with the content to start to its right. It currently gives preference to the centre content, allowing the left and right space relative to the size of the browser window. The logo on the left is currently set as a background image. I want the logo on the left to have priority, and the centre content to adjust to browser size. I haven't been able to figure out how to do that yet. Can anyone help?

    My page is at k2mgt.ca

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    That's kind of tricky given the existing layout of the theme. Right now you have the background image in the body tags -- which is not really what you want to do -- as the page will cover that when the browser window is smaller.

    Do you want the logo image to run all the way up/down the entire page (with the header, content and footer sections to the right of it) -- or do you want the logo to run just below the header and above the footer (in a left sidebar section)? Those are two ways to lay it out -- but the first will involve more modifying of the code of the entire page layout.

  3. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    Actually, I figured out a simple way of doing what you want -- at least from what I understand of what you want. Try changing the margin in this CSS code (line 83 in style.css):

    #page {
        margin: 2em auto 2em 250px;
        max-width: 1000px;

    That puts a fixed margin of 250px on the right side which keeps the main page to the right of the background logo. See if that works.

  4. nikhip
    Posted 2 years ago #

    You are both brilliant and wonderful. Thank you so much, it's exactly what I wanted to do!

  5. lii71
    Posted 1 year ago #

    This seemed pretty close to what I need, but I'd like to add a little twist: is it possible to have the content aligned (more) to the right - up to a limit. If the window becomes very wide, the left margin should get fixed, and the right margin increase instead. And if the window gets very narrow, the left margin should decrease before the content becomes narrower.

    So basically I'd like to keep the left margin between a minimum and maximum value (showing e.g. at least a 200px and at most a 400px wide section of my background image to the left of the content), but not at the expense of the content.

    I'm using a child theme of the twenty twelve.

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    @lii71 - please start your own thread - you are using a different theme so this one is not relevant. Modifications are very theme specific.

Topic Closed

This topic has been closed to new replies.

About this Topic