It is possible to remove scrollbar for textarea on FireFox browser?

Discussion in 'HTML & Website Design' started by YourChild, Jun 13, 2008.

  1. #1
    Can someone show me how to remove the vertical scroll bar for the textarea element for FireFox browsers?

    I have searched the internet and so far I am seeing:

    
    <styles>
    
    textarea{
       overflow:hidden;
    
    }
    </styles>
    
    Code (markup):
    which works fine on IE, Opera but fails on FireFox.

    Does anyone know a way to fix this? :)
     
    YourChild, Jun 13, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    This removes it in the latest version of firefox:
    
    <textarea name="urinput" rows=4 cols=30 style="overflow:hidden;"></textarea>
    
    Code (markup):
     
    itcn, Jun 13, 2008 IP
  3. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #3
    You also have a typo - it should be <style> not <styles>
     
    itcn, Jun 13, 2008 IP
  4. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #4
    Which would be the problem, since the code ItCN posted was the same you already had ;)

    Your code should look like this:

    
    <style type="text/css">
    
    textarea{
       overflow:hidden;
    
    }
    </style>
    ...
    <textarea name="urinput" rows="4" cols="30"></textarea>
    
    Code (markup):
     
    blueparukia, Jun 14, 2008 IP
  5. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #5

    Your code is incorrect also - you have the same typo. You have to close the style with </style>, not </styles>
     
    itcn, Jun 14, 2008 IP
  6. YourChild

    YourChild Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well...I think I lacked some clarity on my original post..sorry for this..

    If I do:

    
    <style>
      
    #urinput{
       overflow:hidden;
    }
    </style>
    
    Code (markup):
    in Firefox, yes the vertical scroll bar is removed...however, the problem occurs when I start typing in text and I keep typing until the text goes down to the next line which goes off the height of the textarea...

    Say for instance, the textarea is like this:

    
    <textarea id="urinput" cols="5" rows="2"></textarea>
    
    Code (markup):
    As I type pass the 2nd row, the new empty line does not get shifted up on the textarea. So as I type, my text goes down and down below the textarea where I cannot see what I'm typing...yeah the text gets recorded inside the textarea but it wont display as I type...

    you guys get what I'm saying? Does anyone know how to fix this problem?
     
    YourChild, Jun 16, 2008 IP