Note that there are some explanatory texts on larger screens.

plurals
  1. POmin-width in IE compatibility mode
    primarykey
    data
    text
    <p>Goal: Have buttons have a minimum width but expand when text is longer than min width like in the case of other languages.</p> <p>The problem is that in IE8 or 9 in compatibility mode, the buttons seem to move outside of their container to the right. I unfortunately cannot provide any code or link to jsfiddle since it does not work in IE8 compat mode, but here are some pictures of the issue.</p> <p><strong>No min-width</strong><br> Buttons shows normally, but obviously does not show the minimum width we want. <img src="https://i.stack.imgur.com/Qvf1g.png" alt="No min-width"></p> <p><strong>With min-width</strong><br> IE layout shows a width of 100px, which is what it should be, but the button seems to move outside of the container (See bottom-right of image). Also notice the other button's text is no longer in the center which I assume is related. <img src="https://i.stack.imgur.com/SjtQ2.png" alt="min-width causes issues"></p> <p><strong>HTML</strong></p> <pre><code>&lt;table width="97%" border="1" class="whiteTable" style="margin: 10px;"&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;div style="position: static; float: left; z-index: 1; width: 100%"&gt; &lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&gt; &lt;tr&gt; &lt;td&gt; &lt;div id="pnlInfo"&gt; &lt;input name="ucAttrEdit$cmdInfo" class="button small" id="ucAttrEdit_cmdInfo" type="submit" value="Info" /&gt; &lt;/div&gt; &lt;/td&gt; &lt;td align="right" colspan="2"&gt; &lt;table cellpadding="0" cellspacing="0" border="0"&gt; &lt;tr&gt; &lt;td class="Pad5"&gt; &lt;div id="pnlOk"&gt; &lt;input name="ucAttrEdit$cmdOk" class="button small" id="ucAttrEdit_cmdOk" type="submit" value="OK" /&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>button, .button, input[type="submit"], input[type="reset"] { background: #4586b6; color: #FFF; border: 0; padding: 3px; font-size: 13px; display: inline-block; height: 22px; cursor: pointer; margin: 0 3px 0 0; width: auto; } button.small, .button.small, input[type="submit"].small, input[type="reset"].small { min-width: 100px; } .Pad5{padding:5px} table.whiteTable { background: #F6F6F6; border: 1px solid #CCC; } </code></pre> <p><strong>Note:</strong> Using the above code and putting IE9 into Browser Mode: IE9 compat mode and Document Mode: IE7 standards replicates the issue I am having.</p>
    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.
 

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