Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created December 12, 2012 18:02
Show Gist options
  • Save billerickson/4270088 to your computer and use it in GitHub Desktop.
Save billerickson/4270088 to your computer and use it in GitHub Desktop.
Make sidebar as tall as content (might need to tweak the numbers based on your padding)
jQuery(document).ready(function($){
var sidebarHeight = $("#sidebar").height() - 50;
var bodyHeight = $("#content-sidebar-wrap").height();
if (bodyHeight > sidebarHeight) {
$("#sidebar").css( 'min-height', bodyHeight + 50 );
$("#content-sidebar-wrap").css( 'min-height', bodyHeight + 50 );
};
});
@don12pt5
Copy link

Simple, nice, works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment