Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox specific margin? [closed]

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...

like image 988
Matt Avatar asked Jul 18 '11 17:07

Matt


People also ask

How do you use margin auto?

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.

How many values a margin style rule Cannot?

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.

What does CSS margin do?

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.


1 Answers

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

@-moz-document url-prefix() {     a {         margin: 0;     } } 
like image 130
wanovak Avatar answered Sep 30 '22 20:09

wanovak