2010-10-06 66 views
1

我有這個素文字,jQuery UI的buttonset在Internet Explorer中向下移動8

<script> 
    $(document).ready(function() { 
     $('.add').button({ 
      icons: 'ui-icon-plus', 
      text: false 
     }).next().button({ 
      icons: 'ui-icon-minus', 
      text: false 
     }).next().button({ 
      icons: 'ui-icon-arrowthick-1-w', 
      text: false 
     }).next().button({ 
      icons: 'ui-icon-arrowthick-1-e', 
      text: false 
     }); 

     $('.radio-container').buttonset(); 
    }); 
</script> 

<button class="add">Add</button> 
<button class="delete">Delete</button> 
<button class="left">Left</button> 
<button class="right">Right</button> 

<span class="radio-container"> 
    <input type="Radio" name="radio" id="radio_1"><label for="radio_1">Radio 1</label> 
    <input type="Radio" name="radio" id="radio_2"><label for="radio_2">Radio 2</label> 
</span> 

它工作正常使用Firefox,但與互聯網 瀏覽器,單選按鈕(在Internet  瀏覽器  8測試)轉移失敗下來是這樣的:

alt text

如何解決呢?

我使用jQuery 1.4.2和jQuery UI 1.8.5。

回答

0

我認爲這必須做更多的CSS與jQuery相比。出於某種原因,你正在將你的收音機輸入設置爲按鈕 - 我對此有疑問。但無論如何,我只能建議在互聯網上點擊F12  資源管理器  8並查看您的元素以及它們如何由CSS表示。

你可能想把CSS作爲你的問題的一部分。

1

jQuery將CSS上的CSS設置爲8像素的邊距。覆蓋並設置CSS標籤{ margin: 0px; }來修復它。

1

我希望這段代碼能幫助你解決你的問題。它工作正常,在我的IE 8

$('.radio-container').buttonset().find('label').css({"vertical-align":"middle"});