barnum — 2009-01-01T16:04:26-05:00 — #1
I found a tutorial on how to create a text box, or leave a message box. The area for commenting however is just oneline horizontally. Is there a way to increase it's size vertically?
my220x — 2009-01-01T16:58:03-05:00 — #2
I believe the cols attribute increases it's height and the rows attribute increases its width.
felgall — 2009-01-01T17:01:31-05:00 — #3
Other way around. COLS is the width and ROWS is the height. They will of course be overridden by the width and height specified in the stylesheet.
my220x — 2009-01-01T17:07:24-05:00 — #4
So, im guessing it would be best to set the width and height of it in the stylesheet?
felgall — 2009-01-01T18:27:46-05:00 — #5
The rows and cols attributes are required for a textarea tag to be valid even though you override them in the CSS.
barnum — 2009-01-01T21:41:30-05:00 — #6
This worked...thanks as always.
<textarea rows="15" cols="60">
stomme_poes — 2009-01-02T10:57:15-05:00 — #7
When you do this, check in all browsers. I might be doing something wrong every time, but whatever widths I set in HTML get screwy in each browser. What seems to be the right width in FF and Opera is wider (or thinner, I can't remember anymore) in IE, and Konqueror just can't get anything right-- often the width is so wide it goes off the screen, or at least outside the container. Damn that browser all to hell, acid test my butt.
Setting different widths in the CSS seems to make a difference, esp since I noticed someone (I can't remember who it was again) seemed to ignore the CSS so I actually did finally end up with most browsers looking alright (except Konq of course but fortunately nobody seems to use that one).
Someone might know why I see this, and it might also have to do with my using Gnome as my desktop setup, as it's definitely screwed with Firefox (form inputs especially, they are much too long when viewed in FF on any Linux distribution I can find who's running Gnome... KDE seems ok).
system — 2009-01-02T17:40:15-05:00 — #8
Well You cant get the same output in every browser perfectly Why code for konquerer lol. I don't know anyone who uses that.
felgall — 2009-01-02T19:42:11-05:00 — #9
The rows and cols attributes are basically there for people who have CSS turned off in their browser. The width and height in the CSS will override those values for everyone else giving a far more consistent output.
stomme_poes — 2009-01-04T06:23:47-05:00 — #10
Why code for konquerer lol. I don't know anyone who uses that.
Since I don't expect each browser to be perfect, no, I don't worry. But I figure if I'm going to keep screen readers in mind while I code, I might as well keep Konq in mind too. I don't know anyone (except me) who uses it but as it comes with some Linux flavours I assume there are users.
shaun — 2009-01-04T07:30:18-05:00 — #11
How do you make those textarea's that automatically re-size when the viewer enters more content ?
soulscratch — 2009-01-04T13:12:21-05:00 — #12
Do you have an example? I think usually most people rely on the default height of a <textarea> element and the fact that overflow is set to scroll. If there's some type of auto resizer, then it must make use of at least two elements I think, querying the computed height of the element which contains text, and seeing if thats greater than or equal to the surrounding element. That or querying the length of the text, and doing some math based on the width of the element, length of string in relation to the width of outer element and such.. ahh my head's about to explode just thinking about it.
felgall — 2009-01-04T15:34:32-05:00 — #13
system — 2009-01-04T17:01:21-05:00 — #14
stomme_poes — 2009-01-08T15:59:38-05:00 — #15
Exception, Shaun: Safari users get to change the height and width at will. There's a little corner you can pull at with the mouse.
I've heard people talk of such things but never actually seen it (changing as you type textareas). Is there some popular site with such things?
shaun — 2009-01-13T23:59:53-05:00 — #16
I've been hoping that is was something as simple as an overflow style (though nothing I've ever tried worked).