Skip to content

Instantly share code, notes, and snippets.

@qbunt
Created December 14, 2011 18:13
Show Gist options
  • Save qbunt/1477774 to your computer and use it in GitHub Desktop.
Save qbunt/1477774 to your computer and use it in GitHub Desktop.
Firefox 1/2 pixel fix
<script>
try {
if ($.browser.mozilla) {
$(window).resize(addMargin).resize();
}
} catch(ex) {}
function addMargin() {
log(window.outerWidth);
$("#container").css('margin-left', window.outerWidth % 2 ? '0': '0.5px')
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment