1) If textbox element (<input type=”text” />
) has its width
property set to inherit
, then textbox doesn’t overflow. But if textbox has width
set to auto
, then it overflows due to browser calculating the width
.
a) Why doesn’t browser take into the account that textbox is inside another element and thus adjusts the width
of a textbox accordingly?
b) Based on what parameters does it decide what the width
of a textbox should be?
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<style type="text/css">
p
{
width:60px;
}
</style>
</head>
<body>
<p>
<input type=”text” />
</p>
</body>
</html>
2) Do all Html elements by default have their width value set to auto?
thanx