2012-07-25 17 views
1

我希望對字段集進行樣式設置,使其具有一個實心邊框。IE8中固體字段集邊框的問題

所以,我的風格是這樣的...

fieldset { 
    margin: 5px; 
    padding: 20px; 
    border: solid orange; 
    border-width: 30px 1px 1px 1px; 
} 

fieldset legend { 
    background-color: orange; 
    line-height: 30px; 
    /* uncomment line below for IE8 */ 
    /* margin-top: -50px; */ 
} 

而且它看起來像這樣在大多數瀏覽器(IE9,Chrome瀏覽器,FF14)...

how it should look

我有問題讓這個工作在IE8上。我添加了一個-ve保證金正確對齊的傳說,但仍有2個垂直白條,我不能擺脫傳說中的每一面......

on MSIE8

小提琴...... http://jsfiddle.net/spiderplant0/NmwuC/

任何想法如何擺脫IE8上的白條(我不在乎IE7,IE6等)?

(順便說一句,是由Drupal的框架生成的HTML,所以我寧願這並不涉及到更改HTML的解決方案。)

+0

試試這個'* {border:0; margin:0; padding:0;}' – 2012-07-25 12:42:03

+0

@Bondye - 謝謝,但沒有工作我很害怕。 – spiderplant0 2012-07-25 12:43:52

回答

2

我檢查,並改變了IE8。檢查http://jsfiddle.net/NmwuC/16/

這僅適用於IE8。

+0

謝謝@rain。關閉,但我在RHS上的酒吧上面獲得了額外的製造品。 – spiderplant0 2012-07-25 14:52:45

+0

請提供您的結果截圖。然後我會再檢查一次。 – Narendra 2012-07-26 02:05:02

+0

它如何在IE8上尋找我:[我得到的](https://docs.google.com/open?id=0B93lksnTC7_cQnd4bkxTdlFZNk0)。 – spiderplant0 2012-07-26 16:56:44