Firefox specific margin?

Matt picture Matt · Jul 18, 2011 · Viewed 48.7k times · Source

How can I set a specific margin for Firefox in CSS? I tried -moz-margin:0px;

My problem is in every browser, even IE works,

but firefox fails at my CSS now... There are certain links that move like 1px to the left when I rollover them...

Answer

wanovak picture wanovak · Jul 18, 2011

Your problem probably lies elsewhere, but here's how you target Firefox only:

@-moz-document url-prefix() {
    a {
        margin: 0;
    }
}