...

View Full Version : dimensions of textarea in CSS?



bazz
12-14-2009, 11:05 PM
Hi,

was reading a thread which highlighted the fact that dimensions of text areas should be in the html - presumably rows and cols. I have used dimensions (in px) for these in my css and they seem to display OK.

Is there a specific browsers(s), which cries if you don't insert rows and cols into the html?

bazz

abduraooft
12-15-2009, 07:22 AM
I think this is for all text-only browsers like Lynx (http://en.wikipedia.org/wiki/Lynx_(web_browser)).

VIPStephan
12-15-2009, 01:05 PM
Is there a specific browsers(s), which cries if you don't insert rows and cols into the html?


Probably not but if you care for valid code rows and cols attributes are mandatory. A textarea lacking these attributes is invalid according to the HTML specs by the W3C.

bazz
12-15-2009, 05:45 PM
Thanks, my pages are valid so I must have addressed this a long time ago and forgotten.

I have rows and cols as well as the css which I think is a bit of duplication. Wouldn't it be better if textareas and perhaps textboxes were to have a browser default size which would well, be used unless css was overriding it?
bazz

gsnedders
12-15-2009, 06:42 PM
As far as I know no browser requires them to be present (and indeed, a lot of the web would break if you did, so a browser with such a requirement would be unusable). Equally, they are optional in HTML 5.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum