How to correctly redefine the CSS settings for FireFox?

Tags: html,css,html5,css3,xhtml

Problem :

I have the following problem with CSS.

I have to define this style that have to be applied only if the used browser is **FireFox)

body {
    text-align: center;
    background-color: #E9FDE9;
    color: #696969;
    size: 12px;

So the CSS setting for the body tag have to be redifined only if the browser is FireFox.

I know that for IE I can use the conditional comment...but for FireFox?

Solution :

This will do the trick:

    @-moz-document url-prefix() { 
       body {
         text-align: center;
         background-color: #E9FDE9;
         color: #696969;
         size: 12px;

    CSS Howto..

    HTML/CSS: how to put all
  • in
      on the same line and centered [duplicate]
  • How to speed up a slow loading PHP page that is processing several large arrays?

    how to make a space-keeping column use css and table tag

    How to make JQuery + CSS Verticle Tabs

    How to stop html/css object from resizing

    How to stop jquery loop function by a click while starting another loop function

    How to disable parent hover, when hovering over child

    Building a DOS-feel script. How to make the command line?

    How do I avoid a fullscreen background image to scale with appearing scroll bars?

    How to put
      around image in css

    How to apply css style for HTML element using Mootools

    How can I insert dynamic text into a div with absolute position?

    how to convert inline CSS into external CSS?

    How to make a 3 column layout fill 100% width using pixel metric on 2 columns?

    How to add 2 jScrollPane to my page and each one has different CSS?

    how to show images with it's original smoothness in IE

    How to force parent div to expand by child div width/padding/margin/box?

    How to draw a responsive shape [closed]

    How to add CSS tag to ruby on rail loop?

    How to make one css input type be displayed the same as another input type

    HTML / CSS How to add image icon to input type=“button”?

    How to make elements appear one by one using css animation

    WordPress: How to style Title and Excerpt in Display Post Shortcode Plugin

    How to stop jitter of relatively placed items on scrolling with mouse?

    How can I align to center floated divs?

    How to do two border upon one div tag by css or by css3? [duplicate]

    How do I make background-size work in IE8?

    How to edit mobile CSS in SocialEngine?

    How to Overcome Bootstrap's Default Styling? Element targeting issues?

    How do I organize imports in Compass/Blueprint?