Jens said:
What's this strange kind of answer?
There exist only the hmtl attributes rows and size for textarea and
input (type=text). Apparently, these are not renered in the same width
when setting them to the same value, so I'm asking whetere one should
use css to set the width or perhaps if there exists some other attribute
like <textarea realsize="x">...
It won't help to make stuff up. Why not look at the spec?
http://www.w3.org/TR/html4/interact/forms.html#edef-TEXTAREA
Now as the others of said, form controls have limited styling from
browser to browser. What you are witnessing is that browsers reserve
space for a scroll bar in TEXTAREAs, Gecko does show the scroll bar
until needed whereas IE and Opera show a disabled one. Now SIZE is an
optional attribute for INPUTs bit ROWS and COLS are not for TEXTAREAs.
And a UA may use a proportional font for controls. Set your required
attributes then override them in your stylesheet.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"
http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>template</title>
<style type="text/css">
..conformDammit {
display: block; font: 1em normal, monospace; width: 15em;
}
</style>
</head>
<body>
<form>
<div>
<input type="text" class="conformDammit">
<textarea rows="5" cols="30" class="conformDammit"></textarea>
</div>
</form>
</body>
</html>