2011-04-04 73 views
0

頁是hereIE6頁面樣式問題

請賜教對如何解決這一問題?

我知道Dean Edwards' IE7 javascript,但也可能是矯枉過正,有一個簡單的解決只是爲了我的問題?

我想:

<!--[if lte IE 7]> 
    <link rel="stylesheet" type="text/css" href="demo/css/ie6.css" media="all"> 
<![else]> 
    <link rel="stylesheet" type="text/css" href="demo/css/common.css" media="all"> 
<![endif]--> 

但它不工作,所以我代替它:

<!--[if lte IE 7]> 
<style type="text/css"> 
... 
</style> 
<![endif]--> 

目前我仍然有第二級菜單的問題,即here

+4

IE6應該被從地球上被驅逐 - ** [升級!(HTTP://www.ie6nomore .com /)** – 2011-04-04 04:45:58

+1

升級只會使開發人員無法爲其客戶和潛在客戶仍然堅持使用IE6的情況測試和修復網站。 – Quentin 2011-04-04 05:33:09

回答

1

@Miranda:要解決你的菜單在IE6,更新下面的規則在你的CSS像這樣 -

.menuArea ul { 
    height: 38px; 
    width: 790px; 
} 

.menuArea ul li { 
    display: inline; 
    font-size: 13px; 
    line-height:2.7em; 
    list-style: none; 
    margin-right: 2px; 
    text-transform: capitalize; 
} 

.menuArea ul li a { 
    color: #383838; 
    display: block; 
    float: left; 
    height: 38px; 
    padding: 0 16px; 
    text-decoration: none; 
} 

我建議你使用conditional-comments爲IE6如果你開始注意到你更新的任何樣式/定義爲使頁面起作用,開始對其他瀏覽器產生負面影響。創建ie6.css文件,並使用下方的主CSS文件條件註釋是這樣的:

<!--[if lte IE 6]> 
    <link rel="stylesheet" type="text/css" href="ie6.css" media="all"> 
<![endif]--> 
0

float:left添加到您的css可能會解決問題。

.menuArea ul li a{ 
    float: left; 
} 

這已經過測試。

+0

注意:由於marc_s評論IE6將被放逐,另見http://ie6countdown.com/。但是Win2k及以下版本無法升級到更高的IE版本http://en.wikipedia.org/wiki/Internet_Explorer#OS_compatibility。 – ace 2011-04-04 05:29:31