【问题标题】:HTML dropwndown horizontal alignment not worked in IE10HTML下拉水平对齐在IE10中不起作用
【发布时间】:2013-11-09 21:10:44
【问题描述】:
以下代码在 IE10 和所有其他浏览器的早期版本中运行良好。
<input type="radio" name="RBLSample" style="display:inherit" value="Test1" />
<input type="radio" name="RBLSample" style="display:inherit" value="Test2" />
<input type="radio" name="RBLSample" style="display:inherit" value="Test3" />
<input type="radio" name="RBLSample" style="display:inherit" value="Test4" />
IN IE10 browser raidion button 一一显示,而不是单行显示。
我想在单行中显示所有单选按钮项。
【问题讨论】:
标签:
html
asp.net
css
internet-explorer
internet-explorer-10
【解决方案1】:
你最好试试这个,因为你使用了display: inherit,这意味着它将相对于父元素定位。
<input type="radio" name="RBLSample" style="display:inherit;float:left;width:15px;" value="Test1" />
<input type="radio" name="RBLSample" style="display:inherit;float:left;width:15px;" value="Test2" />
<input type="radio" name="RBLSample" style="display:inherit;float:left;width:15px;" value="Test3" />
<input type="radio" name="RBLSample" style="display:inherit;float:left;width:15px;" value="Test4" />
【解决方案2】:
试试这个,它肯定会在 IE 10 上运行。
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
input[type="radio"]{float:left;}
}