0

I'm struggling with a sidebar height.

My container is now showing the correct height (that of the content inside), but my sidebar that should be using 100% of that height is still not appearing.

I've implemented float clearing (http://www.quirksmode.org/css/clearing.html) but the sidebar's still not appearing.

I'm sure this is a simple one for you pros, any tips appreciated!

Thanks,

Tom

Here's my code: http://jsfiddle.net/tomperkins/wy52B/

mskfisher
  • 3,291
  • 4
  • 35
  • 48
Tom Perkins
  • 499
  • 3
  • 7
  • 16

2 Answers2

2

Change the sidebar to

position: absolute;
right: 0;

You'll also need to change the container to position: relative.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
0

Or you can use jQuery:

var h = $(".sidebar").parent().height();
$(".sidebar").height(h);
RAMe0
  • 1,415
  • 2
  • 19
  • 31