Support » Themes and Templates » Sidebar “Footer” Bottom Alignment CSS Work-Around?

  • Howdy all,

    Trying to manipulate CSS to let me align an image at the bottom of my sidebar, relative to the height of the sidebar. Here’s what I have so far:

    In the general sidebar CSS,
    #sidebar {
    float: right;
    width: 186px;
    padding:5px 0 0 0;

    In the image box that will move up and down but align with the bottom of the sidebar (not the page):
    #sidebar .box {
    padding:10px 0;

    I read this post:, so that’s where I got the idea to put the sidebar position:relative. The problem with that is that it doesn’t position the box relatively at the bottom of the sidebar, it puts over whatever the last stuff in the sidebar is. To get around that, for now, I have manually heightened the sidebar to 500px, you can look at the site now to see how it works: Once I start posting though, that 500px won’t be enough, and I would like to not have to manually estimate the height of the page everytime.

    When I take off that position code in the sidebar, it positions the box at the bottom of the page, not the sidebar.

    Any ideas? Is this impossible?

Viewing 1 replies (of 1 total)
  • position:absolute takes that element out of the document flow, so it doesn’t occupy any real “space”. Try making the .box a float as well, then clear it.

    <div id="sidebar">
            --sidebar stuff --
        <div class="box">
            --box stuff--
      <div style="clear:both;"></div>

    remove position and height from sidebar
    remove position and bottom from box

    Alternatively — and something I’ve not tried — you could test having .box positioned relatively instead of absolutely. Relative keeps it in the flow. The html would look like above without the clearing div. Keep position:relative in the #sidebar, so .box is positioned relative to #sidebar. Remove height from #sidebar, and change position:absolute to position:relative.

    A quick way to test this is to use firefox and firebug. edit css and see how it looks without going back and forth from code to site.

Viewing 1 replies (of 1 total)
  • The topic ‘Sidebar “Footer” Bottom Alignment CSS Work-Around?’ is closed to new replies.