答案 0 :(得分:0)
除了我上面的邮件...... 尝试,测试,咬我的指甲我发现菜单的奇怪渲染只发生在5个链接中的2个...一个名为“commonmail.html”,另一个链接回“index.html”。当我选择幻想名称或只输入href =“#”时,css会正确呈现。我添加了2个屏幕截图的链接以显示问题:
加价就是这个:
<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;
}