Gast
2008-09-04, 16:22:17
Hi
Ich verwende für eine Webseite ein Menü mit Untermenü der Art, wie ihr es in dem HTML-Code seht.
Funktioniert wunderbar in Opera, Mozilla (Gecko 1.7), Firefox (Gecko 1.8) und IE 7. In Webkit, jüngst mit Google Chrome auch unter Windows gescheit nutzbar, spinnt es etwas.
Das Untermenü öffnet sich nur, wenn ich von rechts (da wo nix ist) nach links auf das Icon zukomme, bzw. beim letzten von unten nach oben.
Wäre schön wenn ihr mir dabei helfen könnt.
Gruß,
Gast
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
<head>
<title>Webkit Test</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
<style type="text/css">
img {
border:none;
}
#navi {
width:142px;
margin:0;
margin-top:3px;
border:none;
text-align:left;
}
#navi ul {
margin:0;
padding:0;
}
#navi ul li {
margin:0;
padding:0;
list-style:none;
clear:both;
position:relative;
min-height:25px; /* fix for Webkit: items with submenu had height 0 */
}
#navi ul li a {
display:block;
padding:5px 0 5px 10px; /*top right bottom left */
margin:2px 0 2px 0;
border:1px solid #000;
color:#666;
text-decoration:none;
width:130px;
background-color:#fff;
}
#navi ul li > a {
min-height:20px;
}
#navi ul li a.hassubm {
width:109px;
float: left;
margin-top:0;
}
#navi ul li a.submlink {
width:10px;
border-left:none;
margin-top:0;
float:right;
}
#navi ul li a:hover {
background-color:#0f0;
color:#333;
}
#navi ul li ul {
width:212px;
display:none;
position:absolute;
left:141px;
top:0px;
background-color:#fff;
}
#navi ul li ul:hover {
display:block;
}
#navi ul li ul li a {
width:200px;
}
#navi ul li a:hover + ul {
display:block;
}
/* ignorieren, dient nur dazu das fremde bildchen zu zentrieren */
#navi ul li img.adjust_ignore {
margin-left:-6px;
margin-top:3px;
}
</style>
</head>
<body>
<div id="navi">
<ul>
<li><a href="#1" class="hassubm">Trallala 1</a><a class="submlink" href="#" onclick="return false;"><img src="http://www.forum-3dcenter.org/vbulletin/images/3dc/insanedruid/buttons/lastpost.gif" alt="" class="adjust_ignore" height="12" /></a>
<ul>
<li><a href="#1.1">hull0w 1</a></li>
</ul>
</li>
<li><a href="#2" class="hassubm">Trallala 2</a><a class="submlink" href="#" onclick="return false;"><img src="http://www.forum-3dcenter.org/vbulletin/images/3dc/insanedruid/buttons/lastpost.gif" alt="" class="adjust_ignore" height="12" /></a>
<ul>
<li><a href="#2.1">hull0w 2</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>
Ich verwende für eine Webseite ein Menü mit Untermenü der Art, wie ihr es in dem HTML-Code seht.
Funktioniert wunderbar in Opera, Mozilla (Gecko 1.7), Firefox (Gecko 1.8) und IE 7. In Webkit, jüngst mit Google Chrome auch unter Windows gescheit nutzbar, spinnt es etwas.
Das Untermenü öffnet sich nur, wenn ich von rechts (da wo nix ist) nach links auf das Icon zukomme, bzw. beim letzten von unten nach oben.
Wäre schön wenn ihr mir dabei helfen könnt.
Gruß,
Gast
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
<head>
<title>Webkit Test</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
<style type="text/css">
img {
border:none;
}
#navi {
width:142px;
margin:0;
margin-top:3px;
border:none;
text-align:left;
}
#navi ul {
margin:0;
padding:0;
}
#navi ul li {
margin:0;
padding:0;
list-style:none;
clear:both;
position:relative;
min-height:25px; /* fix for Webkit: items with submenu had height 0 */
}
#navi ul li a {
display:block;
padding:5px 0 5px 10px; /*top right bottom left */
margin:2px 0 2px 0;
border:1px solid #000;
color:#666;
text-decoration:none;
width:130px;
background-color:#fff;
}
#navi ul li > a {
min-height:20px;
}
#navi ul li a.hassubm {
width:109px;
float: left;
margin-top:0;
}
#navi ul li a.submlink {
width:10px;
border-left:none;
margin-top:0;
float:right;
}
#navi ul li a:hover {
background-color:#0f0;
color:#333;
}
#navi ul li ul {
width:212px;
display:none;
position:absolute;
left:141px;
top:0px;
background-color:#fff;
}
#navi ul li ul:hover {
display:block;
}
#navi ul li ul li a {
width:200px;
}
#navi ul li a:hover + ul {
display:block;
}
/* ignorieren, dient nur dazu das fremde bildchen zu zentrieren */
#navi ul li img.adjust_ignore {
margin-left:-6px;
margin-top:3px;
}
</style>
</head>
<body>
<div id="navi">
<ul>
<li><a href="#1" class="hassubm">Trallala 1</a><a class="submlink" href="#" onclick="return false;"><img src="http://www.forum-3dcenter.org/vbulletin/images/3dc/insanedruid/buttons/lastpost.gif" alt="" class="adjust_ignore" height="12" /></a>
<ul>
<li><a href="#1.1">hull0w 1</a></li>
</ul>
</li>
<li><a href="#2" class="hassubm">Trallala 2</a><a class="submlink" href="#" onclick="return false;"><img src="http://www.forum-3dcenter.org/vbulletin/images/3dc/insanedruid/buttons/lastpost.gif" alt="" class="adjust_ignore" height="12" /></a>
<ul>
<li><a href="#2.1">hull0w 2</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>