views:

1511

answers:

2

I am going through some of my older sites where I have a contact form and in IE8 there always is a vertical scroll bar displayed for my textareas, even when there is no content.

In Firefox, it doesn't seem to make the vertical scroll bar exist until the content in the textarea reaches a height that deems them necessary.

I have styled my input boxes on my older sites, and a scroll bar appearing by default makes them look quite ugly.

My question, is there anything I can do about this, or is it just a default IE8 behaviour?

I've tried setting overflow: auto but it has not worked.

UPDATE

I have checked Stack Overflow in IE8, and the scrollbar appears before entering any text too.

ANOTHER UPDATE

Pardon my stupidity, but the overflow: auto has worked... I just didn't refresh my cache properly. Thanks for the answers guys!

+6  A: 

I can't test on IE8 right now, but I can tell you that this works in IE6:

<textarea style="overflow-y: auto;"></textarea>
brownstone
Check my update! Thanks for your answer.
alex
A: 

Use overflow: hidden and all will be well.

<HTML>
    <BODY>
     <textarea rows="10" style="overflow: hidden;"/>
    </BODY>
</HTML>
Tejs
That would make it very difficult for the user if they enter more text than can fit in the visible area.
Rex M
Bad solution. This hides text and will probably confuse the user.Also, what standard does your tag soup follow?
You
I assumed the OP just wished the scroll bar to not be there at all... my bad!
Tejs