[SOLVED] Horizontal flyout menu and IE's whitespace bug
Posted: Fri Jul 11, 2008 10:51 am
This is strange. Having a problem with the famous whitespace bug from IE 7, while thinking all is OK.
Please look with me:
http://www.tipparijs.nl/index.php
CSS for my flyout menu
In the GOOD browers
like FF all works OK, atleast in FF3, and even in IE 6 the menu works OK but in IE 7... nope. A little whitespace underneath the list item which flies out appears.
So I deleted this piece:
Deleting this part feels a bit strange cause you actually want the whitespace fix aswell on the li.menuparent which encloses the flyout. But deleting this solves the whitespace, but introduces a new one. In IE 7 the flyout disappears when approaching it, which might be understandable cause the list item seems to be smaller then it should be. Making the list item a width of 100% solves that but there is the whitespace again.
Love IE
Someone seeing this one?
Greetz,
rakker
Please look with me:
http://www.tipparijs.nl/index.php
CSS for my flyout menu
Code: Select all
/* MENU */
dfn {
position: absolute;
left: -1000px;
top: -1000px;
width: 0;
height: 0;
overflow: hidden;
display: inline;
}
#menuwrapper {
width: 100%;
}
/* Unless you know what you do, do not touch this */
#primary-nav, #primary-nav ul {
list-style: none;
margin: 0px;
padding: 0px;
width: 100%;
}
#primary-nav ul {
position: absolute;
top: 0;
left: 100%;
display: none;
margin-left: -1px;
}
#primary-nav li {
position: relative;
padding: 0.7em;
border-bottom: 1px solid #c3cf4b;
}
/* Styling the basic apperance of the menu elements */
#primary-nav a {
color: #000000;
margin: 0px;
padding: 0.4em 0.5em 0.4em 2em; /* some air for it */
text-decoration: none;
background: url(images/li.png) no-repeat 0.5em center;
min-height:1em; /* Fixes IE7 whitespace bug*/
display: block;
}
#primary-nav li, #primary-nav li.menuparent {
min-height:1em; /* Fixes IE7 whitespace bug*/
}
/* Styling the basic apperance of the active page elements (shows what page in the menu is being displayed) */
#primary-nav li.menuactive {
background-color: #dce59c;
}
#primary-nav li.menuactive:hover {
background: #c3cf4b;
}
#primary-nav ul li {
background: #e5ebd0;
margin: 0;
}
/* Styling the basic apperance of the menuparents - here styled the same on hover (fixes IE bug) */
#primary-nav li.menuparent,
#primary-nav li.menuparent:hover,
#primary-nav li.menuparenth {
background-image: url(images/cms/arrow.gif);
background-position: center right;
background-repeat: no-repeat;
}
/* Styling the apperance of menu items on hover */
#primary-nav li:hover,
#primary-nav li.menuh,
#primary-nav li.menuparenth,
#primary-nav li.menuactiveh {
background-color: #dce59c;
}
/* The magic - set to work for up to a 3 level menu, but can be increased unlimited */
#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;
}
#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;
}
/* IE Hack, will cause the css to not validate */
#primary-nav li, #primary-nav li.menuparenth { _float: left; _height: 1%; }
#primary-nav li a { _height: 1%; }
/* section header */
#primary-nav li.sectionheader {
font-size: 130%;
font-weight: bold;
padding: 1.5em 0 0.8em 0.5em;
background-color: #fff;
margin: 0;
width: 100%;
}
/* separator */
#primary-nav li hr.separator {
display:block;
height: 0.5em;
background-color: #abb0b6;
width: 100%;
margin:0;
padding:0;
border-top: 1px solid #006699;
border-right: 1px solid #006699;
}
/* EINDE MENU */So I deleted this piece:
Code: Select all
#primary-nav li, #primary-nav li.menuparent {
min-height:1em; /* Fixes IE7 whitespace bug*/
}Love IE
Someone seeing this one?
Greetz,
rakker