Old 06-10-2008, 09:18   #1 (permalink)
Root Ninja
SEO Specialist
 
Root Ninja's Avatar
 
Join Date: Jun 2008
Posts: 231
IE menu fault

Hi all,

This problem is with IE ... The menu below works exactly how I want it to in FireFox, but not in IE (surprise surprise). In IE the long parameters do not take effect (if i removed class="long" it would look the same), does anyone know why? - any feed back in very welcome

HTML Code:
.nav li:hover ul, .nav li a:hover ul, .options li:hover ul, .options li a:hover ul { visibility:visible; height:auto; width: 160px; background-image: url(/images/layout/drop.png); background-position: bottom; top: 34px; overflow:visible; z-index: 5; text-align: left; } ul li:hover .long, ul li a:hover .long{ visibility:visible; height:auto; width: 270px; background-image: url(/images/layout/dropLong.png); background-position: bottom; top: 34px; overflow:visible; z-index: 5; text-align: left; } <ul class="nav"> <li><a href="/products/" title="Products">Products</a> <ul class="long"> <li><a href="/link1/">Link1</a></li> <li><a href="/link2/">Link2</a></li> </ul> </ul>
  Reply With Quote
Old 06-10-2008, 10:59   #2 (permalink)
Rotuy
Limey
 
Rotuy's Avatar
 
Join Date: Apr 2008
Location: Liverpool
Posts: 4,743
It would help to see the site in aid of identifying the problem.
  Reply With Quote
Old 06-10-2008, 14:09   #3 (permalink)
Root Ninja
SEO Specialist
 
Root Ninja's Avatar
 
Join Date: Jun 2008
Posts: 231
Unfortunately I can do that due to client confidentiality, altho if you have any idea what it may be I can supply additional parts of the code, if you believe there is something else conflicting.
  Reply With Quote
Old 07-10-2008, 01:22   #4 (permalink)
Shiro
Whitey
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 7,318
Points
1) you are missing a closing li tag after the first closing ul tag. Try adding that and see if it helps.

2) This:

ul li a:hover .long

will not work. ul.long is not contained inside the a tags, so it is not a child of the a tag. But that CSS is describing it as a child of the a tags.

3) Which IE - IE6? If so, your problem lies there - :hover only works on a(nchor) elements in IE6. Which may be where your problem lies. This:

ul li:hover .long

will work in firefox, because you can add :hover to elements other than a(nchor) tags. But IE6 will just ignore it.
__________________
This space for rent.

After Hours Japan
  Reply With Quote
Old 07-10-2008, 04:45   #5 (permalink)
Root Ninja
SEO Specialist
 
Root Ninja's Avatar
 
Join Date: Jun 2008
Posts: 231
Hi Shiro,

I have tried all of the above with no luck. With the exception of the last one, the issue is in IE6 and IE7, is there an alternative for :hover?
  Reply With Quote
Old 07-10-2008, 21:30   #6 (permalink)
Shiro
Whitey
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 7,318
That means something in your CSS has a higher specificity on that element. Try adding the ID of an ancestor element in front of your selector. So for example if ul.nav is contained inside a div with the id of #left-toolbar or something like that, you would change:

ul li:hover .long

to:

#left-toolbar ul li:hover .long

Adding the ID will give this a higher specificity level than it has now. Whether or not that is enough to give it more specificity than whatever is overpowering it now or not, I don't know, cause I can't see your code. But it's something to try.

If you aren't using firefox with the firebug plugin, you should. It will show you what is the stronger CSS declaration for a particular element.
__________________
This space for rent.

After Hours Japan
  Reply With Quote
Old 09-10-2008, 07:59   #7 (permalink)
7twelve
has bucket
 
7twelve's Avatar
 
Join Date: Aug 2008
Posts: 571
IE only accepts :hover on anchor elements and it should try changing your selector to this

Code:
ul.long li a:hover{}

if you absolutely must have a hover effect on non anchor elements, javascript onmouseover is the only way to go really.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet