Firefox bug: CSS attribute »line-height« not applied to textareas

Enter some text with line breaks to see the problem:


Opera 8 seems to have this problem too, IE 6 applies the line-height correctly.

CSS for textarea

width: 400px; height: 150px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1em; line-height: 2em; color: #333;

Additional info

I've filed this behaviour as bug 304990 on August 17th, 2005. I'm not sure if textares are supposed to support the line-height attribute, but since other attributes are applied correctly I assume it's a bug. Unfortunately I couldn't find anything on Google either. If you have any tips on how to overcome this issue, please contact me.

Solution

The bug tracking team from Mozilla replied very quickly. The bug has already been filed as 243100 in May 2004. It will be fixed in the 1.5 release later this year. (Yes, I did a search on »textarea« and »line-height« in Bugzilla but since the standard search page only shows new and unconfirmed bugs it didn't show up.)

To solve the problem on your local machine you can open the file /res/forms.css in your Firefox directory and delete the entire line line-height: normal !important; from the textarea attributes (at your own risk, of course).