2013-03-05 129 views
2

我有很难得到一个选择领域的工作,因为我想在Chrome的最新版本。这一切在Firefox中完美运行,但Chrome只是固执己见。 应该如何在Chrome:浏览器不响应CSS

enter image description here

如何,它实际上是在Chrome:

enter image description here

HTML:

<td><!--<input type='text' name='ruum' />--> 
<select> 
    <option type="text" value="ruum">Uks</option> 
    <option type="text" value="ruum">Kaks</option> 
    <option type="text" value="ruum">Kolm</option> 
</select> 
</td> 

CSS:

option{ /*works for firefox but not for chrome*/ 
width:8.5em; 
float:left; 
} 

@media screen and (-webkit-min-device-pixel-ratio:0) { /*doesn't do anything*/ 
option{ 
    width:8.5em; 
    float:left; 
} 
} 

有什么建议吗?谢谢。

回答

1

设置<select>的大小,而不是<option>

select{ 
    width:8.5em; 
    float:left; 
} 

看到这个JSfiddle