Height of textarea does not match the rows in Firefox

firefox, html, textarea

Solution

Firefox always adds an extra line after the textfield. If you want it to have a constant height, use CSS, e.g.:

textarea {
    height: 5em;
}

http://jsfiddle.net/Z7zXs/7/

EDIT: You can also use the `@-moz-document url-prefix` CSS extension to target only the Firefox browser. Example

@-moz-document url-prefix() {
    textarea {
        height: 5em;
    }
}

Problem

The textarea's `rows` attribute does not match the number of lines in Firefox. For instance: ``` <textarea rows=4 cols=40> 1 2 3 4 this line is visible in FF </textarea> ``` Example: http://jsfiddle.net/Z7zXs/6/ How can I fix this issue? The textarea should only display 4 lines (instead of 5) for `rows=4`.

Original source