Welcome!

And don't forget to edit your signature & profile.

 

Icon

Statistics

  • Total posts 23318
  • Total topics 4048
  • Total members 5574
  • Our newest member
    ALF5583

TOP POSTERS

Drop Down Menu

All problems and developments related to (X)HTML-markup and stylesheets are discussed and resolved here.
   

Drop Down Menu

Postby one9ooh6 » Wed Oct 28, 2009 1:01 am

I am using the following CSS code for a drop down menu:

#navigation li ul { /* hide submenu */
margin-left: -999em;
position: absolute;
}
#navigation li:hover ul { margin-left: 0; } /*show submenu */


Unfortunately, the above code does not work in IE 6. Any suggestions? Thoughts.
one9ooh6
Smashing <table>
 
Posts: 22
Joined: Mon Aug 24, 2009 11:24 am
   

   

Re: Drop Down Menu

Postby Andy » Wed Oct 28, 2009 1:05 am

one9ooh6 wrote:I am using the following CSS code for a drop down menu:

#navigation li ul { /* hide submenu */
margin-left: -999em;
position: absolute;
}
#navigation li:hover ul { margin-left: 0; } /*show submenu */


Unfortunately, the above code does not work in IE 6. Any suggestions? Thoughts.


Looks like you are using my code :D

And that is correct, :hover does not work in IE6 for anything other than achors.

You'd therefore have to fix IE6 with Javascript. An easy way to do that would be to drop IE7.js into your site which would fix IE6 automagically.

Code: Select all
<!--[if lt IE 7]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script>
<![endif]-->
Andy
Smashing <h5>
 
Posts: 1023
Joined: Tue Sep 30, 2008 6:42 pm
Location: Sweden
   


Return to CSS and (X)HTML



Who is online

Users browsing this forum: No registered users and 1 guest