WordPress.org

Ready to get started?Download WordPress

Forums

Creating Color Behind Sidebar in Twenty Eleven (8 posts)

  1. linncole
    Member
    Posted 11 months ago #

    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.

  2. Evan Herman
    Member
    Posted 11 months ago #

    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

  3. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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.

  4. linncole
    Member
    Posted 11 months ago #

    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.

  5. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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.

  6. linncole
    Member
    Posted 11 months ago #

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

  7. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    No, I don't use child themes

    Why not?

  8. linncole
    Member
    Posted 11 months ago #

    Personal reasons.

Reply

You must log in to post.

About this Topic