Sum the Heights of Two Elements
This takes the code here a bit further. Rather than just setting the min-width of #contentinner equal to the height of #sidebar, we’re setting it equal to #sidebar + #footer-widgets. The magic happens on line 5.
1 2 3 4 5 6 7 | var $contentinner = $('#contentinner'); var footerwidgets = $('#footer-widgets').height(); var sidebarheight = $("#sidebar").height(); var $adjust = sidebarheight + footerwidgets + 20; $contentinner.css({ 'min-height' : $adjust + 'px' }); |