• Resolved inkandpixelclub

    (@inkandpixelclub)


    I’m having some issues with my sidebar. I’m a CSS novice so please be patient if I don’t get your solutions right away.

    The idea is for my sidebar to be about slightly to the left of the the right border of the body, slightly to the right of the content, overlapping the header, and flush with the top of the page. This is usually what I see when I look at my site. But if I change the size of the window, the sidebar moves, remaining a fixed distance from the edge of the window. I’ve had people tell me that when they load my page, the sidebar is covering the content which means they can’t read my site which isn’t good.

    There are a few things I would like to be able to do:

    – Fix the position of the sidebar so it stops moving based on the window size. I’m guessing it has to do with the “position: absolute” attribute, but everything else I’ve tried either causes the sidebar to disappear if the window gets to small or permanently migrate to the bottom of the page.

    – Fix the dimensions of the page. In addition to the sidebar moving around, the borders move when the window size changes. I’d rather they stay put so making the window bigger would just reveal more background around the content.

    – Make the sidebar go to the bottom of the page. Right now it just has a very large bottom margin, but I’d like it to go all the way to the bottom of every page which out making the page any longer than the content.

    Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Posting a link to your site would be a good place to start

    Thread Starter inkandpixelclub

    (@inkandpixelclub)

    Ack! Sorry! I just plain forgot. Here’s the site.

    If you want your sidebar to remain fixed, then you need to start by applying a fixed with to #page. A width of about 1150px would seem to be a good value to start with. Then remove the absolute positioning on #sidebar and float it left.

    Thread Starter inkandpixelclub

    (@inkandpixelclub)

    OK, the page width is fixed and the sidebar is no longer moving. Now can I get it to overlap the banner again?

    Add something like margin:-50px 0 0; to #sidebar and adjust the negative top margin value to suit.

    Thread Starter inkandpixelclub

    (@inkandpixelclub)

    Looking good. And I got it nudged over to the horizontal position I wanted. (I r lurning.) Now if you can tell me how to make the sidebar run the whole length of the page, I will be eternally grateful.

    Ah – The Holy Grail of multi-column design! The bad news is that said Grail hasn’t been found yet. There are all kinds of “fixes” that you can try to apply depending upon the design but they all have their problems. You could try and apply a min-height to the sidebar but that could backfire on short pages.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sidebar Positioning’ is closed to new replies.