Grow your CSS skills. Land your dream job.

Sidebar width as long as page?

  • # June 22, 2010 at 1:05 pm

    i have a bg on the left side of the side bar
    its repeat-y
    and u want it to be 100% in height.

    this is my current css

    Code:
    #pagesidebar {
    width:240px;
    float:left;
    background-image:url(‘images/bb2_bg.png’);
    background-repeat:repeat-y;
    padding-left:20px;
    }

    here’s a screenshot

    # June 22, 2010 at 1:20 pm

    You haven’t added the HTML so it’s difficult to give a straight answer. You are going to have to apply a clearfix to the parent element. Have a look at this article: http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack/

    # June 23, 2010 at 8:05 pm

    If you want a 100% height sidebar ,you could try this solution: http://innonesen.se/test/l-6/

    Basically, it is an implementation of : http://www.positioniseverything.net/art … qualheight
    which utilizes a long padding for the element , countered with negative margin of the same size.

    # June 24, 2010 at 7:14 am

    or put the bg image on the content or container instead

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".