Jump to content

Recommended <textarea> size?


supertrucker

Recommended Posts

I use several <textarea> tags in my mobile scripts, for inputting user data, i.e., an "About Me", entering discussions in Forums, etc. Is there a recommended rows/cols for mobiles? While playing with it, most mobiles will only let the width of the text area to go as far as the edge of the screen, so even if you put in 1000 cols, then it will shrink it to the screen size. As for the rows, those seem to be a little flexible, and if you put 50 rows in, then it will display a textarea with 50 rows! That's not very optimal for mobile devices.On the other hand, many mobiles will actually open up their own text input area when a user clicks on a text area. So I was wondering, is there a one size fits all here? The one screwing me up right now is Blackberrys, as the input area is used 100% - i.e., it doesn't open up it's own textarea for input, but interacts directly with the object. I'm sure that there are many other devices that do this as well, so would a textarea like <textarea cols="50" rows="5"> be adequate enough for most devices?Thanks for any input, just trying to optimize my site!ST

Link to comment
Share on other sites

CSS usually has preference over the rows and cols attributes, but since the rows and cols attributes are necessary, I usually give about 5 rows and 60 cols.Just usa CSS to style it later and you shouldn't have any trouble. Using percentages in the width can make sure it won't exceed the screen width.

Link to comment
Share on other sites

That seemed to work quite nicely, thank you! By the way, can you put comments in CSS, pardon my ignorance, I'm just to lazy to look it up right now and have like 50 different how tos running through my head!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...