2013-03-05 138 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