Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>ok, I can clearly see this replicated in IE now.</p> <p>It appears to be a bug in IE (IE has notorious issues with percentages) dependant on a scenario where:</p> <ul> <li>the input is in a table</li> <li>AND the input is sized in percentage</li> <li>AND the input has a default value (i.e. in the markup) which exceeds the width</li> </ul> <p>Therefore a couple of obvious workarounds exist:</p> <ul> <li>put the input in a floating <code>&lt;div&gt;</code> layout instead (I would do this if it's semantically correct) </li> <li>size width in units like <code>em</code> (preferably) or <code>px</code> (if your design can afford it)</li> <li>inject the value with client script after the load (this is a poor solution, <em>don't</em> do this)</li> </ul> <p>and one non-obvious workaround which I would recommend if you require <em>both</em> the table and the percentages:</p> <ul> <li>an IE only CSS rule <code>width: expression(this.parentNode.offsetWidth*0.9);</code></li> </ul> <p>Hope this helps.</p> <p><em>(previous answer requesting code deleted)</em></p> <hr> <p><strong>Edit:</strong> code snippet based on your sample, works in IE + FF</p> <pre><code>&lt;style&gt; /* table method */ table {width: 100%;} th {width: 25%; text-align: center; font-weight: 700;} td {height: 24px; width: 25%;} td input {overflow: hidden; width: 90%; } /* IE only correction */ * html td input {width: expression(this.parentNode.offsetWidth*0.9);} /* float method */ #foo {width: 100%;background:blue;} #foo div {float:left; width: 25%;} #foo div input {width: 90%;} &lt;/style&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Last&lt;/th&gt; &lt;th&gt;First&lt;/th&gt; &lt;th&gt;Middle&lt;/th&gt; &lt;th&gt;Email&lt;/th&gt; &lt;tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaa aaaaaaaaaaaa aaaaa aaaaaaaaaaaaaaa" /&gt; &lt;/td&gt; &lt;td&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaaaaaaaaaaaaaaaaaaaa" /&gt; &lt;/td&gt; &lt;td&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaaaaaa aaaaaaaa aaaaaaaaaab bbbbbbbb bbbbbbbbbbbbbbbb" /&gt; &lt;/td&gt; &lt;td&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaa aaaaaa aaaaaaa aaaaa" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;div id="foo"&gt; &lt;div&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaa aaaaaaaaaaaa aaaaa aaaaaaaaaaaaaaa" &gt; &lt;/div&gt; &lt;div&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaaaaaaaaaaaaaaaaaaaa" &gt; &lt;/div&gt; &lt;div&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaaaaaa aaaaaaaa aaaaaaaaaab bbbbbbbb bbbbbbbbbbbbbbbb" &gt; &lt;/div&gt; &lt;div&gt; &lt;input maxlength="256" type="text" name="additionalContact" value="aaaaaaaa aaaaaa aaaaaaa aaaaa" &gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload