Support » Themes and Templates » Creating Color Behind Sidebar in Twenty Eleven

  • Hello,

    I’m working on hollyhilton.com. This is the code I used to create a color behind the sidebar:

    .widget {
    background-color: #ff0;
    clear: both;
    margin: 0 0 0em;
    padding: 10px;
    }

    I’d like to widen the bar of color to the left so there’s an equal amount of space on either side of Holly’s photo.

    Thanks for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Ideally you want all content inside of the sidebar to be centered.

    You can wrap the content in <center></center>

    or you can set a width and apply a margin: 0 auto;

    you will probably also need to widen the sidebar to allow room for the text to move a bit

    Try adding this to your custom CSS:

    .textwidget img {
       display: block;
       margin: 0 auto;
    }

    Widening the sidebar will be more involved…

    <center> is deprecated CSS – best to avoid outdated code.

    Thank you, that did work, but the bullet points in the menu are still outside the color.

    I’d also like to move the block of color/sidebar? to the left somewhat so that strip of white to the left of it isn’t so wide, if that’s possible.

    Are you making any changes to theme files? You really should not be doing that except in a child theme — as your changes will be lost when WP is updated.

    No, I don’t use child themes, but could you help me out anyway? I would save important code before updating.

    No, I don’t use child themes

    Why not?

    Personal reasons.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Creating Color Behind Sidebar in Twenty Eleven’ is closed to new replies.