|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sub menus not working in IE6
I have a menu which is working fine in IE7 and FF but create problem in IE6. could some one help on this
Here is the HTML code Code:
<div class="menu">
<ul>
<li><a class="drop" href="">OUR SERVICES</a>
<ul>
<li><a class="drop" href="">Speciality Multi-Craft Services</a>
<ul style="margin-bottom:-36px; z-index:1;">
<li><a href="">Industrial Work Access</a>
<div class="dottedline"></div>
</li>
<li><a href="">Speciality Coating</a>
<div class="dottedline"></div>
</li>
<li><a href="">Abrasive Blasting</a>
<div class="dottedline"></div>
</li>
<li><a href="">Insulation Services</a>
<div class="dottedline"></div>
</li>
<li><a href="">Refractory Services</a>
<div class="dottedline"></div>
</li>
<li><a href="">Corrosion Protection</a>
<div class="dottedline1"></div>
</li>
<li><a href="">Fireproofing Services</a></li>
</ul>
</li>
<li>
<div class="dottedline2"></div>
<a class="drop" href="" style="border-top:none;">Other Services</a>
<ul>
<li><a href="">Infrastructure Services</a>
<div class="dottedline"></div>
</li>
<li><a href="">Commercial Work Access</a>
<div class="dottedline"></div>
</li>
<li><a href="">Civil Construction</a>
<div class="dottedline"></div>
</li>
<li><a href="">Safety Services</a>
<div class="dottedline1"></div>
</li>
<li><a href="">Special Events Services</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="">ABOUT US</a></li>
<li><a href="">CAREERS</a></li>
<li style="margin-right:0px;"><a href="">CONTACT US</a></li>
</ul>
</div>
Here is the CSS code Code:
/* style the outer div to give it width */
.menu {
width:860px;
height:35px;
font-size:0.85em; margin:0 auto; z-index:5; position:absolute;left:50px; margin-top:341px;
}
/* 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:168px;
position:relative;
margin-right:57px;
}
/* style the links for the top level */
.menu a, .menu a:visited {
display:block;
font-size:14px;
font-weight:bold;
font-family:Arial, Helvetica, sans-serif;
text-decoration:none;
color:#5f6062;
width:168px;
height:35px;
background-image:url(../images/tab-bg.jpg); background-repeat:no-repeat;
text-align:center;
line-height:29px;
}
/* a hack so that IE5.5 faulty box model is corrected */
* html .menu a, * html .menu a:visited {
}
/* style the second level background */
.menu ul ul a.drop, .menu ul ul a.drop:visited {
background:#ffffff; width:170px; height:25px;DISPLAY: block; }
/* style the second level hover */
.menu ul ul a.drop:hover {
background:#c9ba65;DISPLAY: block;
}
.menu ul ul :hover > a.drop {
background:#ffffff;DISPLAY: block;
}
/* style the third level background */
.menu ul ul ul a, .menu ul ul ul a:visited {
background:#ffffff;width:150px;height:25px;DISPLAY : block;}
/* style the third level hover */
.menu ul ul ul a:hover{
background:#b2ab9b;DISPLAY: block;
}
.menu ul ul ul :hover > a {
background:#ffffff;DISPLAY: block;}
/* style the table so that it takes no part in the layout - required for IE to work */
.menu table {border-collapse:collapse; border:0; position:absolute; left:0; bottom:-1px;}
/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {
visibility:hidden;
position:absolute;
bottom:35px;
left:0;
width:150px;DISPLAY: block;
}
* html .menu ul ul {
bottom:30px;
}
/* position the third level flyout menu */
.menu ul ul ul{
left:190px;
bottom:0;
width:129px;DISPLAY: block;
}
/* position the third level flyout menu for a left flyout */
.menu ul ul ul.left {
left:-150px;
}
/* style the second level links */
.menu ul ul a, .menu ul ul a:visited {
background:#d4d8bd;
color:#5f6062; font-weight:normal;
padding:5px 10px;
width:129px;
font-size:11px;
text-align:left;
DISPLAY: block;
font-family:Verdana/* yet another hack for IE5.5 */
}
* html .menu ul ul a{
width:150px;
w\idth:129px;
DISPLAY: block;
}
/* style the top level hover */
.menu a:hover, .menu ul ul a:hover{
color:#b30538;
background-image:url(../images/tab-bg.jpg); background-repeat:no-repeat;DISPLAY: block;
}
.menu :hover > a, .menu ul ul :hover > a {
color:#b30538;
background-image:url(../images/tab-bg.jpg); background-repeat:no-repeat;DISPLAY: block;
}
/* 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;
height:auto;DISPLAY: block; position:absolute;
}
/* keep the third level hidden when you hover on first level list OR link */
.menu ul :hover ul ul{
display:none; position:absolute;
}
/* keep the fourth level hidden when you hover on second level list OR link */
.menu ul :hover ul :hover ul ul{
display:block; position:absolute;
}
/* make the third level visible when you hover over second level list OR link */
.menu ul :hover ul :hover ul{
display:block;
bottom:0; position:absolute;
}
/* make the fourth level visible when you hover over third level list OR link */
.menu ul :hover ul :hover ul :hover ul {
display:block;
bottom:0; z-index:4; position:absolute;
}
Kindly help me on this issue as soon as possible |
|
#2
|
||||
|
||||
|
Why not add a link to your pages urging people to upgrade to IE7+ or move to FF?
|
|
#3
|
|||
|
|||
|
client want it to IE6 as well
|
|
#4
|
|||
|
|||
|
Here is the link
dev(dot)beis(dot)com(slash)beta |
|
#5
|
||||
|
||||
|
The sub-menus ARE working, but they are just placed behind your flash thingie.
Have you tried playing with the z-index values some more? MSIE may expect an element with a z-index to have a set width and/or height as well, mind you.... |
|
#6
|
|||
|
|||
|
no dear I try it seperatley as well without flash but its not working
|
|
#7
|
|||
|
|||
|
Need to use Javascript to make work in IE6
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); This code is all you need to get a css hover to work in IE6. I hope this helps. |
![]() |
| Viewing: SEO Chat Forums > Other > HTML Coding > Sub menus not working in IE6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|