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