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...
The auto Value You can set the margin property to auto to horizontally center the element within its container. The element will then take up the specified width, and the remaining space will be split equally between the left and right margins.
Syntax. The margin property may be specified using one, two, three, or four values. Each value is a <length> , a <percentage> , or the keyword auto . Negative values draw the element closer to its neighbors than it would be by default.
In CSS, a margin is the space around an element's border, while padding is the space between an element's border and the element's content. Put another way, the margin property controls the space outside an element, and the padding property controls the space inside an element.
Your problem probably lies elsewhere, but here's how you target Firefox only:
@-moz-document url-prefix() { a { margin: 0; } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With