Created
February 26, 2009 21:30
-
-
Save jimjeffers/71127 to your computer and use it in GitHub Desktop.
Give any div a class 'column' and if it's absolutely positioned this jQuery script will fix the height of the container for you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fix any absolutely positioned columns if necessary. | |
$(document).ready( function(){ | |
$('.column').each(function(){ | |
var cur = $(this); | |
if(cur.css('position') == 'absolute') { | |
var parent = $(cur.parent().get(0)); | |
if(cur.height() > parent.height()) { | |
parent.css('height',cur.height()); | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment