Hello. Is there anybody who can give me an explanation, why the actual width of the textboxes in my two examples is different? (Second example is missing a DocType declaration.)
After that, I would like to know how to set the textbox to the same width as combox if I want to include a DocType declaration?
Thanks in advance.
Example 1
Example 2
After that, I would like to know how to set the textbox to the same width as combox if I want to include a DocType declaration?
Thanks in advance.
Example 1
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style>
input { width: 40em; }
select { width: 40em; }
</style>
</head>
<body>
<input type="text"></input>
<br />
<select></select>
</body>
</html>
Code:
<html>
<head>
<style>
input { width: 40em; }
select { width: 40em; }
</style>
</head>
<body>
<input type="text"></input>
<br />
<select></select>
</body>
</html>
Comment