Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question textarea rows="2" limitation Firefox

    Here is the code in question.

    Code:
    <textarea rows="2"></textarea>
    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?

  • #2
    Senior Coder
    Join Date
    Feb 2006
    Location
    USA
    Posts
    1,013
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could try using CSS to define the height.

    Here's an example using inline CSS.
    Code:
    <textarea rows="2" style="height:2em;"></textarea>
    Also you could try searching Bugzilla.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
    Java != JavaScript && JScript != JavaScript
    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    Saskatoon SK Canada
    Posts
    174
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Netscape

    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.

    Code:
    <textarea name="message" rows="2" cols="40" wrap="virtual" style="width:250px; height:25px;">Type your message here</textarea>
    CP
    Colin Puttick

  • #4
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    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.
    Last edited by drhowarddrfine; 03-06-2006 at 07:09 PM.

  • #5
    Regular Coder
    Join Date
    Sep 2002
    Location
    Saskatoon SK Canada
    Posts
    174
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

    Code:
    .no_scroll_textarea {
    	background-color: #FFFFFF;
    	scrollbar-face-color: #FFFFFF;
    	scrollbar-highlight-color: #FFFFFF;
    	scrollbar-shadow-color: #FFFFFF;
    	scrollbar-3dlight-color: #FFFFFF;
    	scrollbar-arrow-color:  #FFFFFF;
    	scrollbar-track-color: #FFFFFF;
    	scrollbar-darkshadow-color: #FFFFFF;
    }
    CP
    Colin Puttick

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Just use overflow:auto; the scrollbar goes away in IE when not needed.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •