I have a right column on my page that has varying heights, set as height: auto;
I also have a left content section, that I want to mimic the height of my right column.
How can I do this using css, jquery, or some other code?
I have a right column on my page that has varying heights, set as height: auto;
I also have a left content section, that I want to mimic the height of my right column.
How can I do this using css, jquery, or some other code?
$(document).ready(function() {
var x = $('#primary').height();
$('#sidebar').css('height', x);
});
This jQuery snippet will take the height of #primary
and apply it to #sidebar
, syncing the height of both elements.
http://jsfiddle.net/pUXCE/4/ <-- working example.