/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Setting Textarea Width and Height

I read that it’s better to set the width and height of a textarea tag with CSS rather than with the cols and rows attributes. But, not having cols and rows specified will raise an error when you validate your page (that’s what I remember, anyway). Won’t cols and rows overwrite any CSS you specify?

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@Cory_RJul 12.2011 — Quite the opposite, actually. CSS overrides cols and rows, so you can set a 'dummy' cols and rows value for validation then use CSS to specify what the actual width and height should be.
Copy linkTweet thisAlerts:
@Joseph_WitchardauthorJul 12.2011 — Really? Is this true for all CSS or just inline styling?
Copy linkTweet thisAlerts:
@Cory_RJul 12.2011 — In accordance to my tests, CSS always overrides HTML attributes, and they don't even have to be inline styles.
Copy linkTweet thisAlerts:
@Joseph_WitchardauthorJul 12.2011 — Great. Thanks?
×

Success!

Help @Joseph_Witchard spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...