472,145 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

No horizontal scrollbar for textarea

Happy new year to you all,

I have a problem with the css settings for the horizontal scrollbar of
a textarea.

When I look at my textarea's in Internet Explorer (I use 5.5) I see
only a vertical scrollbar when the area contains a too long text. IE
wil just break off the text at the limit if a single word is too long
and put the next character on the next line. For me this is the desired
bahaviour (those horizontal scrollbars take too much space). Mozilla
makes both a horizontal and a vertical scrollbar. I tried to disable
this, but this did not have any effect.

My testpage looked as follows:

<html><head>
<STYLE type='text/css'>
textarea {overflow-x: hidden; overflow-y: scroll}
</STYLE>
</head>
<body>
<form>
<textarea rows=3 cols=20>
Thisisjustalotofuselesstext, meant to be too long for this very small
textbox.
</textarea>
</form>
</body></html>

How can I solve this?

Thanks, musicmouse

Jan 1 '06 #1
2 104111
musicmouse wrote:

I have a problem with the css settings for the horizontal scrollbar of
a textarea.

textarea {overflow-x: hidden; overflow-y: scroll}


The standard property is overflow. overflow-x and overflow-y are
proprietary to IE.

The best you can do is overflow:auto. This may set one or both
scrollbars as needed, but there is no guarantee all browsers will give
the results you want. Live with it and move on.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jan 2 '06 #2
overflow: scroll;
overflow-y: scroll;
overflow-x: hidden;
overflow:-moz-scrollbars-vertical;

This should fix your problem for firefox and internet explorer browsers.
Jul 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Pal Csepregi | last post: by
4 posts views Thread by anna | last post: by
1 post views Thread by Marco Liedekerken | last post: by
1 post views Thread by dhnriverside | last post: by
4 posts views Thread by Sakharam Phapale | last post: by
14 posts views Thread by Michael Weis | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.