2009-11-13 29 views
3

<select>具有60px的寬度,如何在IE6中使<option>比<select>更寬?

<option>含量長於。

它隱藏在IE6中。

enter image description here

如何解決呢?

+1

複製全部文章? http://stackoverflow.com/questions/1700807/how-to-show-extended-option-in-select-list,http://stackoverflow.com/questions/1702186/set-width-of-dropdown-element -in-html-select-dropdown-options – anddoutoi 2009-11-13 08:15:50

+2

停止支持IE6 – Jason 2009-11-13 08:34:46

+0

@anddoutoi,通過這些線程看,似乎沒有解決方案。 – Mask 2009-11-13 08:41:32

回答

0

我們加入的下一個按鈕選擇改變選擇的寬度設置爲默認值,因此它成爲非限制寬度。

+0

你能更具體嗎? – Csser 2009-11-13 07:36:57

0

簡單和簡單的答案:這是不可能的,沒有JavaScript。並且當您的佈局將使用JavaScript解決方案時select變得更寬時。

請參閱我對重複主題的評論以獲取更多信息。

0

我知道這是幾年後,但它可能有助於某人尋找解決方案。

您可以在CSS中設置選擇對象的寬度,例如,

select { 
    width: 100px; /* normal state */ 
} 

select:focus { 
    width: 200px; /* wider when in focus */ 
} 

http://dinowebs.net/?p=114

相關問題