Menu not working in IE6 [SOLVED]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
AdamTetz
New Member
New Member
Posts: 8
Joined: Sat Apr 18, 2009 7:10 pm

Menu not working in IE6 [SOLVED]

Post by AdamTetz »

Hello coders!

Currently I'm working on a website for a local track. So far I've got everything like I wanted.
The only issue I'm getting is that the dropdown menu doesn't work in IE6. And i can't find out why :-\

Can a Guru spot the issue? As the site works fine in chrome, firefox & ie7

Check it out: http://www.adamtetz.nl

Menu code

Code: Select all

 
/* by Alexander Endresen and mark and Nuno */
#menu_vert {
/* no margin/padding so it fills the whole div */
	margin: 0;
	padding: 0;
}
.clearb {
/* needed for some browsers */
	clear: both;
}
#menuwrapper {
/* IE6 Hack */
	height: 1%;
	width: auto;
	margin: 0;
	padding: 0;
}
ul#primary-nav, ul#primary-nav ul {
/* remove any default bullets */
	list-style-type: none;
	margin: 0;
	padding: 0;
}
ul#primary-nav {
	margin-top: 40px;

}
ul#primary-nav ul {
/* make the ul stay in place so when we hover it lets the drops go over the content below else it will push everything below out of the way */
	position: absolute;
/* top being the bottom of the li it comes out of */
	top: auto;
/* keeps it hidden till hover event */
	display: none;
/* same size but different color for each border */

}
ul#primary-nav ul ul {
/* now we move the next level ul down from the top a little for distinction */
	margin-top: 1px;
/* pull it in on the left, helps us not lose the hover effect when going to next level */
	margin-left: -1px;

/* keeps the left side of this ul on the right side of the one it came out of */
	left: 100%;
/* sets the top of it inline with the li it came out of */
	top: 0px;
}
ul#primary-nav li {
/* floating left will set menu items to line up left to right else they will stack top to bottom */
	float: left;
/* no margin/padding keeps them next to each other, the padding will be in the "a" */
	margin: 0px;
	padding: 0px;
}
#primary-nav li li {

/* Set the width of the menu elements at second level. Leaving first level flexible. */
	width: 180px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size:12px;
	font-style: italic;
/* removes any left margin it may have picked up from the first li */
	margin-left: 0px;
/* keeps them tight to the one above, no missed hovers */
	margin-top: ;
/* removes the left float set in first li so these will stack from top down */
	float: none;
/* relative to the ul they are in */
	position: relative;
}

/* set the "a" link look here */
ul#primary-nav li a {
	color: #8F8F8F;
/* pushes out from the text, sort of like making links a certain size, if you give them a set width and/or height you may limit you ability to have as much text as you need */

	padding: 2px;
	display: block;
/* sets no underline on links */
	text-decoration: none;
}
ul#primary-nav li a:hover {
/* kind of obvious */
	color: #fff;
}
ul#primary-nav li li a:hover {
/* this is set to #000, black, below so hover will be white text */
	color: #FFF;
background-color: transparent;


}
ul#primary-nav li a.menuactive {
	color: #c42020;
/* bold to set it off from non active */
	font-weight: bold;
/* set your image here */
	background:  ;
}
ul#primary-nav li a.menuactive:hover {
	color: #c42020;
/* keep it the same */
	font-weight: bold;
	background:  #;

}
#primary-nav li li a.menuparent span {
/* makes it hold a shape */
	display: block;
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
	background:  #blue;
}
/* gif for IE6, as it can't handle transparent png */
* html #primary-nav li li a.menuparent span {
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
	background-color:  ;
}
ul#primary-nav li ul a {
/* insures alignment */
	text-align: left;
	margin: 0px;
/* keeps it relative to it's container */
	position: relative;
/* less padding than first level no need for large links here */
	padding: 6px 3px 6px 15px;
/* if first level is set to bold this will reset this level */
	font-weight: normal;
/* first level is #FFF/white, we need black to contrast with light background */
	color: #000;
	border-top: 0 none;
	border-right: 0 none;
	border-left: 0 none;
}
ul#primary-nav li ul {
/* very lite grey color, by now you should know what the rest mean */
	background: #F3F5F5;
	margin: 0px;
	padding: 0px;
	position: absolute;
	width: auto;
	height: auto;
	display: none;
	position: absolute;
	z-index: 999;
	border-top: 1px solid #FFFFFF;
	border-bottom: 1px solid #374B51;
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
	opacity: 0.95;
/* CSS 3 */
}
ul#primary-nav li ul ul {
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
	opacity: 95;
/* CSS 3 */
}
/* Styling the appearance of menu items on hover */
#primary-nav li:hover,
#primary-nav li.menuh,
#primary-nav li.menuparenth,
#primary-nav li.menuactiveh {
/* set your image here, dark grey image */
	background:  ;
	color: #000
}
/* The magic - set to work for up to a 3 level menu, but can be increased unlimited, for fourth level add
#primary-nav li:hover ul ul ul,
#primary-nav li.menuparenth ul ul ul,
*/
#primary-nav ul,
#primary-nav li:hover ul,
#primary-nav li:hover ul ul,
#primary-nav li.menuparenth ul,
#primary-nav li.menuparenth ul ul {
	display: none;
}
/* for fourth level add
#primary-nav ul ul ul li:hover ul,
#primary-nav ul ul ul li.menuparenth ul,
*/
#primary-nav li:hover ul,
#primary-nav ul li:hover ul,
#primary-nav ul ul li:hover ul,
#primary-nav li.menuparenth ul,
#primary-nav ul li.menuparenth ul,
#primary-nav ul ul li.menuparenth ul {
	display: block;
}
/* IE6 Hacks */
#primary-nav li li {
	float: left;
	clear: both;
}
#primary-nav li li a {
	height: 1%;
}@charset "utf-8";
/* CSS Document */


Last edited by AdamTetz on Mon Feb 14, 2011 3:02 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu not working in IE6

Post by Dr.CSS »

Most likely you are missing the call for the IE6 js that makes that menu work...

<!--[if lte IE 6]>
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->
AdamTetz
New Member
New Member
Posts: 8
Joined: Sat Apr 18, 2009 7:10 pm

Re: Menu not working in IE6

Post by AdamTetz »

I already had that tag in the head. The thing is, if i switch back to the original template the menu still doesn't work in IE6 ???
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu not working in IE6

Post by Dr.CSS »

You are right, it now has parent at the end of the menu call for class so you will have to add some lines to the style sheet...

In the top one that has display:none...

#primary-nav li.menuparent ul ul,

For the one under it that has display:block...

#primary-nav li.parenth ul,

That IE6 JS adds an h to the end of the last class call to trigger the drop...
AdamTetz
New Member
New Member
Posts: 8
Joined: Sat Apr 18, 2009 7:10 pm

Re: Menu not working in IE6

Post by AdamTetz »

Thanks! Menu works like a charm now.

Do you know why my .navend div is showing beneath my logo? Again only in ie6 :-\
It seems like the menu gets the whole width of the div in ie6.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu not working in IE6

Post by Dr.CSS »

I would have made the menu left image one with the left image and the middle image together, put it in the div nav for background, then used the right image in the menuwrapper on the right, you need to also give the nav a width, since you don't have a set width, auto is not a set width, ie6 just lets it be as wide as it's parent div pushing the right image down...
AdamTetz
New Member
New Member
Posts: 8
Joined: Sat Apr 18, 2009 7:10 pm

Re: Menu not working in IE6

Post by AdamTetz »

Thanks for your reply! it's all good now ;D
Post Reply

Return to “Layout and Design (CSS & HTML)”