IE8 menu works correctly, IE7 menu give problems
Posted: 21 July 2010 01:14 PM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2010-07-21

Hi

I’m quite new to the HTML_CSS and most of what i’ve learn already was self taught.

I’ve designed a website and it works totally fine with all major browsers except IE7. For some reason my vertical submenu (5 items) changed in 2 colums 3 left an 2 right)
Please can somebody help me with this issue?

/* menu::base */
div#menu {
        
margin:470px 0 0 300px;
        
position:absolute;
        
height52px;
        
padding-left6px;
        
backgroundurl(../images/left.pngno-repeat;
        
_backgroundurl(../images/left.gifno-repeat;
        
width:auto;
        
z-index8;
}

div
#menu ul {
 
margin0;
 
padding0;
 list-
stylenone;
 
floatleft;
}

div
#menu ul.menu {
 
padding-right6px;
 
backgroundurl(../images/right.pngno-repeat right 0;
 
_backgroundurl(../images/right.gifno-repeat right 0;   
}

div
#menu li {
 
positionrelative;
 
margin0;
 
padding0;
 
displayblock;
 
floatleft;
 
z-index9;
 
widthauto;
}

div
#menu ul ul li {
 
z-index9;
}

div
#menu li div {
        
list-stylenone;
        
floatleft;
        
positionabsolute;
        
z-index11;
        
top: -0px;
        
left0;
        
visibilityhidden;
        
width400px;
        
padding0;
        
backgroundurl(../images/subsubmenu-top.pngno-repeat 0px 0;
        
_backgroundurl(../images/subsubmenu-top.gifno-repeat 0px 0;
        
heightauto;
        
margin-top: -142px;
        
margin-right0;
        
margin-bottom0;
        
margin-left: -2px;
}

div
#menu ul ul {
        
z-index12;
 
padding0px 4px 10px 4px;
 
backgroundurl(../images/submenu-bottom.pngno-repeat 0px bottom;
 
_backgroundurl(../images/submenu-bottom.gifno-repeat 0px bottom;       
 
margin10px 0 0 0;   
}

div
#menu li:hover>div {
 
visibilityvisible;
}

div
#menu a {
 
positionrelative;
 
z-index10;
 
height50px;
 
displayblock;
 
floatleft;
 
line-height50px;
 
text-decorationnone;
 
margin-top1px;
 
white-spacenowrap;
 
widthauto;
 
padding-right:5px;
 
text-align:center;
}

div
#menu span {
        
margin-top2px;
        
padding-left15px;
        
color#fff;
        
backgroundnone;
        
line-height50px;
        
displayblock;
        
cursorpointer;
        
background-repeatno-repeat;
        
background-position950;
        
text-aligncenter;
        
font-familyVerdanaGenevasans-serif;
        
font-size13px;
        
font-stylenormal;
        
font-weightnormal;
        
font-variantnormal;
}

/* menu::level1 */
div#menu a {
        
padding0 10px 0 0;
        
line-height50px;
        
height52px;
        
margin-right5px;
        
_margin-right1px;
        
backgroundnone;
        
text-transformnone;
}

div
#menu a:hover {
 
background:  url(../images/selected-right-sub.png)  no-repeat right -1px;
}

div
#menu a:hover span {
 
backgroundurl(../images/selected-left-sub.pngno-repeat 0 -3px;
}

div
#menu li.current a,
div#menu ul.menu>li:hover>a {
 
backgroundurl(../images/selected-right-sub.png)  no-repeat right -1px;
}

div
#menu li.current a span,
div#menu ul.menu>li:hover>a span {
 
backgroundurl(../images/selected-left-sub.pngno-repeat 0 -3px;
}

div
#menu ul.menu>li:hover>a span {
        
color#9C3;
}
div
#menu li {  }
div#menu li.last { background: none; }

/* menu::level2 */
div#menu ul ul li {
 
backgroundnone;
 
padding0;
}

div
#menu ul ul a {
        
padding0px;
        
heightauto;
        
floatnone;
        
displayblock;
        
line-height25px;
        
font-size13px;
        
color#fff;
        
z-index: -1;
        
padding-left5px;
        
white-spacenormal;
        
width136px;
        
margin0 8px;
        
text-transformnone;
}

div
#menu ul ul a span {
        
padding0 5px;
        
line-height25px;
 
font-size13px;
}

div
#menu li.current ul a,
div#menu li.current ul a span {
 
background:none;
}

div
#menu ul ul a:hover {
        
background:none;
        
background-color#092909;
}

div
#menu ul ul a:hover span {
        
background:none;
        
color#9C3
}

div
#menu ul ul a.parent {
        
backgroundurl(../images/submenu-pointer.pngno-repeat right bottom;
        
_background-imageurl(../images/submenu-pointer-hover.gif);
}

div
#menu ul ul a.parent span {
        
background:none;
}

div
#menu ul ul a.parent:hover {
        
backgroundurl(../images/submenu-pointer.pngno-repeat right bottom;
        
_backgroundurl(../images/submenu-pointer-hover.gifno-repeat right bottom;
        
background-color#092909;
}

div
#menu ul ul a.parent:hover span {
        
background:none;
}

div
#menu ul ul span {
       
 
margin-top0;
 
text-alignleft;
}

div
#menu ul ul li.last { background: none; }
div#menu ul ul li {
 
width100%;
}

/* lava lamp */
div#menu li.back {
 
backgroundurl(../images/selected-left-sub.pngno-repeat 0 0;
 
width5px;
 
height52px;
 
z-index8;
 
positionabsolute;
 
padding0;
 
margin0px 0 0 0;
}

div
#menu li.back .left {
 
padding:0;
 
width:auto;
 
backgroundurl(../images/selected-right-sub.pngno-repeat right 0;
 
height52px;
 
margin0 0 0 5px;
 
floatnone;
 
positionrelative;
 
top0;
 
left0;
 
visibilityvisible;
Profile
 
 
Posted: 22 July 2010 12:09 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  2
Joined  2010-07-21

This is solved


For IE7 you need to ad min-width next to the width:

div#menu ul ul li {
width: 100%;
min-width: 100%;
}

Profile