Why <textarea> and <textfield> not taking font-family and font-size from body?

Posted by metal-gear-solid on Stack Overflow See other posts from Stack Overflow or by metal-gear-solid
Published on 2010-05-20T14:44:44Z Indexed on 2010/05/20 14:50 UTC
Read the original article Hit count: 151

Filed under:
|

Why Textarea and textfield not taking font-family and font-size from body?

See live example here http://jsbin.com/ucano4

Code

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>texearea font</title>
        <style type="text/css">
        body {
            font-family: Verdana, Geneva, sans-serif;
            font-size:16px
        }
        </style>
        </head>            
        <body>
        <form action="" method="get">
        <textarea name="" cols="20" rows="4"></textarea>
        <input name="" type="text" />
        </form>
        <p>some text here</p>
        </body>
        </html>

If it's a usual behavior then should i write in css like this. i need same style in all

body,textarea,input  {
                font-family: Verdana, Geneva, sans-serif;
                font-size:16px
            }

And how many other elements in XHTML which will not take font styling from body {....}?

© Stack Overflow or respective owner

Related posts about XHTML

Related posts about css