2013-03-02 41 views
0

在閱讀了很多有用的提示後,我充滿希望,我可以在這裏找到我的問題的答案。 我正在處理的網頁包含一個帶有按鈕background-imgs的水平菜單。 驗證後在瀏覽器上進行測試,在FF,Chrome和Opera上看起來很好。上傳後,我發現在線 Opera不顯示部分按鈕,而其他瀏覽器沒有區別。 ???? 預先感謝有關此問題的任何想法Opera瀏覽器顯示菜單(css)不同的在線和本地

+1

向我們展示您的HTML/CSS。或者製作一個[JSFiddle](http://jsfiddle.net/)。 – Vucko 2013-03-02 13:00:09

回答

0

除了我上面的郵件... 嘗試,測試,咬我的指甲,我​​發現菜單的奇渲染髮生2 5只鏈接...一個名爲「commonmail.html」,另一個鏈接回「index.html」。當我選擇幻想的名字或只需鍵入的href =「#」的CSS呈現properly.I添加鏈接到2張截圖顯示問題:

menu with fantasy link names

menu with normal link names

的加價是這一個:

<ul> 
    <li><a class="direkt" href="#">home</a></li> 
    </ul> 

    <ul> 
    <li class="firstlevel">our houses 

     <ul> 
     <li><a href="nikiti_location.html">in nikiti</a></li> 

     <li><a href="#">in kastri</a></li> 

     <li><a href="#">new projects</a></li> 
     </ul> 

    </li> 
    </ul> 

    <ul> 
    <li><a class="direkt" href="nikiti_info.html" title="Informations about Nikiti and the peninsula of Sithonia">nikiti</a></li> 
    </ul> 

    <ul> 
    <li class="firstlevel">informations 

     <ul> 
     <li><a href="#" title="Read about our family business and our business philosophy">company</a></li> 

     <li><a href="#" title="">buying property in greece</a></li> 
     </ul> 

    </li> 
    </ul> 

    <ul> 
    <li><a class="direkt" href="commonmail.html" title="Informations about Nikiti and the peninsula of Sithonia">contact</a></li> 
    </ul>  

</nav> 

而CSS是這一個:

nav { 
width: 704px; 
padding: 0 0 0 16px; 
float: left; 
} 
nav ul { 
float: left; 
width: 138px; 
list-style-type: none; 
} 
nav li.firstlevel { 
font-size: 93%; 
    font-weight:bold; 
text-align: center; 
padding-top: 17px; 
padding-bottom: 17px; 
color: #fff; 
border: 1px solid transparent; /*--erforderlich für IE 7--*/ 
background: url(../pic/button110.png) 50% 50% no-repeat; 
} 
nav a { 
text-decoration: none; 
display: block; 
font-size: 90%; 
text-align: left; 
padding-left: 6px; 
padding-top: 6px; 
padding-bottom: 6px; 
background: url(../pic/sublistbg.png) 0 0 repeat-x; 
color: #fff; 
} 
nav a:hover { 
color: #454545; 
background: url(../pic/sublisthoverbg.png) 0 0 repeat-x; 
} 
nav li { 
position: relative; 
} 
nav ul ul { 
position: absolute; top:50px; left: 30px; 
width: 170px; 
z-index: 2; 
display: none; 
} 
nav ul li:hover ul { 
display: block; 
} 
nav ul a.direkt:link { 
font-size: 93%; 
font-weight: bold; 
padding-top: 17px; 
padding-bottom: 17px; 
padding-left: 0; 
text-align: center; 
color: #fff; 
border: 1px solid transparent; 
background: url(../pic/button110.png) 50% 50% no-repeat; 
} 

nav ul a.direkt:hover { 
color: #454545; 
background: url(../pic/button110active.png) 50% 50% no-repeat; 
border: 1px solid transparent; 
} 
相關問題