473,320 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Work around for li:hover in IE6

KeredDrahcir
426 256MB
I am using a list to create a Main Menu with a drop down submenu. I need to able to using the hover pseudo class to display the drop down menu but IE6 only allows it on anchors. Is there a work round for it because at the moment it doesn’t appear which means half the pages can't be accessed and there are enough of my visitors using IE6 still to make it worth getting it working?
Expand|Select|Wrap|Line Numbers
  1.  
  2. .mainmenu li ul {
  3.     display: none;
  4.     float: left;
  5.     left: 0;
  6.     padding: 5px 0 10px 0;
  7.     position: absolute;
  8.     text-align: left;
  9.     top: 24px;
  10.     width: 200px;
  11.     z-index: 1;
  12. }
  13.  
  14. .mainmenu li:hover ul {
  15.     display: block;
  16. }
Oct 11 '11 #1
6 2060
drhowarddrfine
7,435 Expert 4TB
Only with javascript but I don't have that hack right now.
Oct 12 '11 #2
KeredDrahcir
426 256MB
Is the JavaScript simple? I don't mind using a JavaScript work round. It needs to be done. Thanks.
Oct 12 '11 #3
drhowarddrfine
7,435 Expert 4TB
I'm out of town. There are examples by just Googling 'ie6 hover'.
Oct 12 '11 #4
Use jQuery, and run:

Expand|Select|Wrap|Line Numbers
  1. $(function(){
  2.  $('li:hover').hover(function(){
  3.   $(this).css('style', 'block')
  4.  },
  5.  function(){
  6.   $(this).css('style', 'none')
  7.  });
  8.  
  9. });
  10.  
[*Edit: URL removed]
Oct 12 '11 #5
drhowarddrfine
7,435 Expert 4TB
Using jQuery for this is a total overkill for this and can be accomplished in just a few lines of js instead of loading a library.
Oct 12 '11 #6
KeredDrahcir
426 256MB
Let me know if you can find the code please. All the results I get from Google suggest jQuery but if it can be done with JavaScript I'd rather do that.
Oct 14 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: jack | last post by:
Hi all, Im an asp.net developer.I have resigned and have started an hand over process to one of the person in the office the hand over is of the web application which is a maintainance project....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.