How To Fix the IE6 Box Model with jQuery
By jonkarna
$("#footer").fixBox();I don't know if this method is solid or if there are some bugs but it seems like a neat little way to get around some of the IE6 pains.
jQuery.fn.fixBox = function() {
return this.each(function() {
var $$ = $(this);
var hd = $$.outerHeight() - $$.height();
var wd = $$.outerWidth() - $$.width();
if (!$$.boxModel) {
if ($$.css("height") != "auto" && hd > 0) $$.height($$.outerHeight() + hd);
if ($$.css("width") != "auto" && wd > 0) $$.width($$.outerWidth() + wd);
}
});
};Comments
No comments yet.