1

I have two columns, the left side div is a navigation bar and it is floating to the left, the content can expand (height) as much as it wants, I want the left floating div (the left nav) to expan with the content div.

I have an eample markup. I want the yellow div to expan equal to the red div, withouth having to specify the height of the div.

Link to to the jsfiddle is http://jsfiddle.net/saaedb/F5c97/1/

Thanks

kevin628
  • 3,458
  • 3
  • 30
  • 44
  • http://stackoverflow.com/q/10458465/882428 - I answered a question just like this a couple days ago. Take a look and see if it helps you out. – Chords May 08 '12 at 21:41

1 Answers1

0

You'll need to use Javascript/jQuery to achieve this. Here's a fiddle: http://jsfiddle.net/KjyNm/

jQuery:

$(document).ready(function() {
 $("#leftnav").css("height", $("#content").height());
});​

HTML:

<div id="wrapper" style="">
  <div id="leftnav">

  </div>
  <div id="content">

  </div>
</div>
Chords
  • 6,720
  • 2
  • 39
  • 61