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,177
  • 3
  • 33
  • 47
Tom Perkins
  • 489
  • 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
  • 837,282
  • 173
  • 1,862
  • 1,933
0

Or you can use jQuery:

var h = $(".sidebar").parent().height();
$(".sidebar").height(h);
RAMe0
  • 1,311
  • 2
  • 16
  • 28