2009年3月1日星期日

Firefox uses different fonts for input and textarea

By default, Firefox uses different fonts for input and textarea. If you don't set the font family used by input or textarea, even though the font size of them is identical, the display of text in them is different.  This is because that Firefox uses monospace fonts for textarea, but variable-width fonts for input

So besides setting the font size of input and textarea, you need to set the font family directly in CSS. A sample can be found here

input, textarea
{
color: red;
font-family: Verdana,Arial,Sans-serif;
font-size: 0.8em;
}


没有评论:

Technology changes life