$.fn.fixFxTableMargin @��ؚU �F\ӚU $.fn.fixFxTableMargin = function(conf){ if(!$.browser.mozilla) return this; this.each(function(){ var elem = $(this); elem.wrap('<div class="fixFxTableMargin" />'); var mt = elem.css('margin-top'), mb = elem.css('margin-bottom'); elem.css({'margin-top':0,'margin-bottom':0}) elem.parent().css({'margin-top':mt,'margin-bottom':mb}) }); return this; };
![gist: 840389 - Fix the Firefox's bug that vertical margins of table elements don't collapse.- GitHub](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)