Why

– Jitendra Vyas May 20 '10 at 15:13
  • 3
    The styles for `h1` don't define a font, therefore your `body` styles take precedence. The styles for `input` does define a style, and it is more specific than your selector, so it wins. – nickf May 20 '10 at 15:17
  • +1 for your comment . I wasn't aware. you mean some elements has specfic style by default in browser and cannot be override by body {....} – Jitendra Vyas May 20 '10 at 15:20
  • 1

    I think what he means is some elements are more specific than others in the DOM, or have a smaller scope. Since a textarea exists inside the body, any style defined for textarea will overwrite body{} styles. So FF's default textarea style overwrites your body style, even though yours is defined later (usually something more recent will take precedence, but not if it's in a broader scope/less specific).

    0

    I tried all sorts of tricks to stop textarea in mobile using a much larger font than the normal text. It seems that when my textarea was cols="45" the font was normal but as soon as it was raised to cols="71", even though it stayed inside the td tags the font grew large.

    On the mozilla page ( https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust ) I found this

    textarea {
       text-size-adjust: none;
    }
    

    It seems to the best answer for me. It works on PC, tablet and, most importantly, on my android phone.