View Full Version : textarea rows="2" limitation Firefox
03-06-2006, 05:35 PM
Here is the code in question.
IE 6 understands the textarea should only have two rows. Firefox is forcing three rows. How can I fix this issue?
Is this a Firefox bug?
03-06-2006, 05:55 PM
You could try using CSS to define the height.
Here's an example using inline CSS.
<textarea rows="2" style="height:2em;"></textarea>
Also you could try searching Bugzilla (https://bugzilla.mozilla.org/).
03-06-2006, 06:24 PM
I agree, the best thing to do anyhow is to use a style to tell it exactly what you want. Make a class or use an inline style. Whatever you like best.
<textarea name="message" rows="2" cols="40" wrap="virtual" style="width:250px; height:25px;">Type your message here</textarea>
03-06-2006, 07:06 PM
I'm wondering if that extra line is for a potential scrollbar. Is there a way to turn the scrollbar off? I notice IE has a vertical scrollbar.
user agents should provide some means to scroll through the contents of the control when the contents extend beyond the visible area.
03-06-2006, 07:41 PM
I don't think you can turn the scrollbar off in IE. FF doesn't display a scrollbar unless it is necessary. A work-around for IE would be to "hide" the scrollbar by using a CSS class and assigning it to your textarea. The class would define all the scrollbar colors to be the same as you told the background-color of the textarea to be = hidden...sorta. ;)
03-06-2006, 07:57 PM
Just use overflow:auto; the scrollbar goes away in IE when not needed.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.