Zum Inhalt springen

ULTIMATE CSS only drop-down menu klappt im IE7 nicht auf, und im FF gibts auch Probleme

Erstellt am 29. September 2008 · 3 Antworten · letzte Antwort am 29. Januar 2009

Tags: HTML & CSS, Frage

chilliwaffel ·

Hallo...

Das Thema gibt es bestimmt irgendwo, aber ich kommt es nicht finden. Ich habe mir das Menü ULTIMATE CSS only drop-down menu von http://typo3.intervation.de/snippets/menues/the-ultimate-css-only-drop-down-menu.html besorgt, aber es funktioniert nicht richtig. Im IE zeigt er die zweite Ebene nicht an, wenn ich über die Menüpunkte in der ersten Ebene gehe, und im Firefox zeigt er, wenn er die zweite Ebene anzeigen soll, sofort alle(!) dritten Ebenen der jeweiligen zweiten Ebene an. Im Opera zeigt er das Menü nur mit einem kleinen Problem an, nämlich das er wenn man in der zweiten Ebene über die Menüpunkte fährt, der erste Menüpunkt der zweiten Ebene immer orange bleibt. Ich weiß echt nicht wo der Fehler steckt.

Um sich ein Bild davon zu machen, hier der Link zu der betroffenden Seite: http://www.schnaps-regal.de/index.php?id=357

Ich hoffe ihr könnt mir weiter helfen.

Hier mein Typo Script

#######################
######### NAVIAGTION
#######################                        
	marks.NAVIGATION = HMENU
	marks.NAVIGATION {
		excludeUidList = 64,15

		special = directory

		# Hier die Start-ID angeben
		special.value = 355


		wrap = <div class="menu"> | </div>
 
		# Hauptmenue
		1 = TMENU
		1{
			wrap = <ul> | </ul>
			expAll = 1
			NO.ATagTitle.field = subtitle//title
			NO.wrapItemAndSub = <li> | </li>
			NO.stdWrap.prepend = COA
			NO.stdWrap.prepend.10.wrap = ~  |
			IFSUB = 1
			IFSUB {
				wrapItemAndSub = <li> | </li>
				allWrap = | <!--<![endif]-->
				linkWrap = |<!--[if IE 7]><!-->
				ATagBeforeWrap = 1
			}
			ACT < .NO
			ACT = 1
			ACT.ATagParams = class=dropact
			ACTIFSUB < .IFSUB
			ACTIFSUB.ATagParams = class=dropact
		}
		2 = TMENU
		2{
			wrap = <!--[if lte IE 6]><table><tr><td><![endif]--><ul> | </ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
			expAll = 1
			NO.ATagTitle.field = subtitle//title
			NO.wrapItemAndSub = <li> | </li>
			IFSUB = 1
			IFSUB {
				wrapItemAndSub = <li> | </li>
				allWrap = | <!--<![endif]-->
				linkWrap = |<!--[if IE 7]><!-->
				ATagBeforeWrap = 1
				ATagParams = class=drop
			}
		}
	 
		3 < .2
	 
		4 < .2
	 
	}

und mein CSS:

.menu {
	/*width: 910px; */
	font-size: 12px;
	position: relative;
	z-index: 100;
}

/* remove all the bullets, borders and padding from the default list styling */
.menu ul {
	padding: 0;
	margin: 0;
	list-style-type: none;
}

.menu ul ul {
	width: 150px;
}

/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
.menu li {
	float: left;
	width: 100px;
	position: relative;
}

/* style the links for the top level */
.menu a, .menu a:visited {
	display: block;
	font-size: 12px;
	text-decoration: none;
	font-weight: bold;
	color: #FF9200; 
	width: 100px;
	height: 27px; 
	border: 1px solid #000000; 
	border-width: 1px 1px 1px 1px; 
	background: #333333; 
	/*padding-left: 1px; */
	line-height: 27px;
}

/* a hack so that IE5.5 faulty box model is corrected */
* html .menu a, * html .menu a:visited {
	width: 100px;
	w\idth: 100px;
}
 
/* style the second level background */
.menu ul ul a.drop, .menu ul ul a.drop:visited {
	background: #333333;
}

/* style the second level hover */
.menu ul ul a.drop:hover{
	background: #FF9200;
	color: #000000;
}

.menu ul ul :hover > a.drop {
	background: #FF9200;
	color: #000000;
}

/* style the third level background */
.menu ul ul ul a, .menu ul ul ul a:visited {
	background: #333333;
	color: #FFFFFF;
}

/* style the third level hover */
.menu ul ul ul a:hover {
	background: #FF9200;
}

/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {
	visibility: hidden;
	position: absolute;
	height: 0;
	top: 28px;
	left: 0; 
	width: 150px;
}

/* another hack for IE5.5 */
* html .menu ul ul {
	top: 30px;
	t\op: 31px;
}
 
/* position the third level flyout menu */
.menu ul ul ul{
	left: 150px; 
	top: 0;
	width: 150px;
}

/* position the third level flyout menu for a left flyout */
.menu ul ul ul.left{
	left: -150px;
}
 
/* style the table so that it takes no ppart in the layout - required for IE to work */
.menu table {
	position: absolute;
	top: 0;
	left: 0;
}
 
/* style the second level links */
.menu ul ul a, .menu ul ul a:visited {
	background: #333333; 
	color: #FFFFFF; 
	height: auto; 
	line-height: 1em; 
	padding: 5px 10px; 
	width: 129px;
}

/* yet another hack for IE5.5 */
* html .menu ul ul a{
	width: 150px;
	w\idth: 129px;
}
 
/* style the top level hover */
/*.menu a:hover, .demo .menu ul ul a:hover*/
.menu a:hover, .menu ul ul a:hover{
	color: #000000; 
	background: #FF9200;
}

.menu :hover > a, .menu ul ul :hover > a {
	color: #000000; 
	background: #FF9200;
}
 
/* make the second level visible when hover on first level list OR link */
.menu ul li:hover ul, .menu ul a:hover ul{
	visibility: visible; 
}

/* keep the third level hidden when you hover on first level list OR link */
.menu ul :hover ul ul{
	visibility: hidden;
}
 
/* make the third level visible when you hover over second level list OR link */
.menu ul :hover ul :hover ul{
	visibility: visible;
}
gerik ·

Hallo Chiliwaffel,
konntest Du Dein Problem schon lösen? Ich habe nämlich genau das gleiche Problem.
Viele Grüße
Gerik

2bbionic ·

Hallo ihr beiden,

auch ich habe genau das gleiche Problem #angry#
Ist einer von euch schon auf die Lösung gekommen? Wäre super, wenn hier jemand einen Tipp abgeben könnte, bevor es mir das Wochenende versaut #paralyzed#

Grüße,

2bbionic

JR1 ·

Ich nutze dieses Menü auch und bei mir gab es das Problem mit dem IE6. Hier ist der CSS Code, der auf jeden Fall funktioniert. Einfach Zeile nach Zeile anpassen und jedesmal überprüfen. Dann findet ihr den Fehler. Bei mir läuft es mit IE6, IE7, Firefox, Opera, Chrome

/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menus/final_drop2.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This stylesheet and the assocaited (x)html may be modified in any 
way to fit your requirements.
=================================================================== */
/* style the outer div to give it width */
.menu {
width:750px; 
font-size:0.85em;
padding-bottom:200px;
}
/* remove all the bullets, borders and padding from the default list styling */
.menu ul {
padding:0;
margin:0;
list-style-type:none;
}
.menu ul ul {
width:150px;
}
/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
.menu li {
float:left;
width:150px;
position:relative;
}
/* style the links for the top level */
.menu a, .menu a:visited {
display:block;
font-size:11px;
text-decoration:none; 
color:#fff; 
width:139px; 
height:30px; 
border:1px solid #fff; 
border-width:1px 1px 0 0; 
background:#758279; 
padding-left:10px; 
line-height:29px;
}
/* a hack so that IE5.5 faulty box model is corrected */
* html .menu a, * html .menu a:visited {
width:150px;
w\idth:139px;
}

/* style the second level background */
.menu ul ul a.drop, .menu ul ul a.drop:visited {
background:#949e7c;
}
/* style the second level hover */
.menu ul ul a.drop:hover{
background:#c9ba65;
}
.menu ul ul :hover > a.drop {
background:#c9ba65;
}
/* style the third level background */
.menu ul ul ul a, .menu ul ul ul a:visited {
background:#e2dfa8;
}
/* style the third level hover */
.menu ul ul ul a:hover {
background:#b2ab9b;
}
.menu ul ul ul :hover > a {
background:#b2ab9b;
}

/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {
visibility:hidden;
position:absolute;
height:0;
top:31px;
left:0; 
width:150px;
}
/* another hack for IE5.5 */
* html .menu ul ul {
top:30px;
t\op:31px;
}

/* position the third level flyout menu */
.menu ul ul ul{
left:150px; 
top:0;
width:150px;
}
/* position the third level flyout menu for a left flyout */
.menu ul ul ul.left {
left:-150px;
}

/* style the table so that it takes no part in the layout - required for IE to work */
.menu table {position:absolute; top:0; left:0;}

/* style the second level links */
.menu ul ul a, .menu ul ul a:visited {
background:#d4d8bd; 
color:#000; 
height:auto; 
line-height:1em; 
padding:5px 10px; 
width:129px
/* yet another hack for IE5.5 */
}
* html .menu ul ul a{
width:150px;
w\idth:129px;
}


/* style the top level hover */
.menu a:hover, .menu ul ul a:hover{
color:#fff; 
background:#949e7c;
}
.menu :hover > a, .menu ul ul :hover > a {
color:#fff;
background:#949e7c;
}

/* make the second level visible when hover on first level list OR link */
.menu ul li:hover ul,
.menu ul a:hover ul{
visibility:visible; 
}
/* keep the third level hidden when you hover on first level list OR link */
.menu ul :hover ul ul{
visibility:hidden;
}
/* keep the fourth level hidden when you hover on second level list OR link */
.menu ul :hover ul :hover ul ul{
visibility:hidden;
}
/* make the third level visible when you hover over second level list OR link */
.menu ul :hover ul :hover ul{ 
visibility:visible;
}
/* make the fourth level visible when you hover over third level list OR link */
.menu ul :hover ul :hover ul :hover ul { 
visibility:visible;
}