Fkn CSS menu!

Status
Not open for further replies.

Masetek

Errr...WTF??
Jun 24, 2006
100
1
0
Your mums house
I've installed a new css menu on one of my sites. And of course, everything works perfectly in FF but not in IE. When you mouse over a link that has a submenu popup it creates a gap of about 10px underneath. Check it out in ie and you'll see what I mean...

my site

Heres the code:

Code:
/*
Vertical Menu ------------------------------------------------------------------ */

ul.makeMenu, ul.makeMenu ul {
  width: 135px;                 /* sets the size of the menu blocks */
  background-color: #f26522;      /* makes the menu blocks mint green - a bg-color MUST be included for IE to work properly! */
  padding-left: 0px;           /* stops the usual indent from ul */
  margin-left: 0px;            /* Opera 7 final's margin and margin-box model cause problems */
}

ul.makeMenu ul {
	border: 1px solid #000;
	border-bottom: 0px;
}

ul.makeMenu li {
  list-style-type: none;       /* removes the bullet points */
  
  margin:0px;                 /* Opera 7 puts large spacings between li elements */
  padding:0px;
  border:0px;
  position: relative;          /* makes the menu blocks be positioned relative to their parent menu item
                                  the lack of offset makes these appear normal, but it will make a difference
                                  to the absolutely positioned child blocks */
  color: #fff;                 /* sets the default font colour to white */
}
ul.makeMenu li > ul {          /* using the > selector prevents many lesser browsers (and IE - see below) hiding child ULs */
  display: none;               /* hides child menu blocks - one of the most important declarations */
  position: absolute;          /* make child blocks hover without leaving space for them */
  top: -1px;                    /* position slightly lower than the parent menu item */
  left: 135px;                  /* this must not be more than the width of the parent block, or the mouse will
                                  have to move off the element to move between blocks, and the menu will close */
}


ul.makeMenu ul.CSStoShow {     /* must not be combined with the next rule or IE gets confused */
  display: block;              /* specially to go with the className changes in the behaviour file */
}
ul.makeMenu li:hover > ul {    /* one of the most important declarations - the browser must detect hovering over arbitrary elements
                                  the > targets only the child ul, not any child uls of that child ul */
  display: block;              /* makes the child block visible - one of the most important declarations */
}

/* and some link styles */

ul.makeMenu li a:hover, ul.makeMenu li a.CSStoHighLink {
	color: #000;
	background-color: #f98c59;
	text-decoration: none;
}

ul.makeMenu li:hover > a {
	color: #000;
	background-color: #f98c59;
	text-decoration: none;
} 

ul.makeMenu a {
	padding: 0;
	margin: 0;
	padding-top: 5px;
	padding-bottom: 5px;
	text-align: center;
	background-color: #f26522;
	border: 0px;
	border-bottom: 1px solid #000;
	font-family: Verdana, arial, helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	color: #fff;
	text-decoration: none;
	display: block;
	width: 100%;
}

ul.makeMenu a:visited {
    color: #fff;
    text-decoration: none;
}

Anyone care to shed some light on why it is doing this? Fuck I hate this IE css browser compatibility bullshit! /vent
 


okay, try this...

in your markup...

<li>item 1</li>
<li>item 2</li>

change that shit to this...

<li>item 1</li><
li>item 2</li><
li>item 3</li>

or put it all on one line

ie doesn't handle whitespace between elements too well, and sometimes introduces padding because of this
 
chris said:
okay, try this...

in your markup...

<li>item 1</li>
<li>item 2</li>

change that shit to this...

<li>item 1</li><
li>item 2</li><
li>item 3</li>

or put it all on one line

ie doesn't handle whitespace between elements too well, and sometimes introduces padding because of this

that sounds like something Ridiculous associated with ie. Unfortunately it didnt fix it.

Any other ideas?
 
Status
Not open for further replies.