SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hover problem in css dropdown menu

    Hi All,

    I am busy styling a drupal module called nice menu. It is completly written in CSS.

    the menu links are being build up as li for the first links and li li for the links under it etc.

    I have applied hover effect which work in ff but not all in IE 6.0. for example, li li.menuparent does work in IE but not the normal first links li.

    At the moment I cannot provide the code since I am on the road. But after some posts here I got impressed by the knowlidge of people here so.....hopefully somebody understands my post right away.

    If not, I will post the code.

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    IE 6 does not recognise the :hover pseudo element if it is attached to any selector other than a. So:

    Code:
    li {color: red;}
    
    li:hover {color: blue;}
    will not work in IE ( or opera i think) but will work in most other browsers.

    You'll need to apply the hover to the a element in your menu:

    Code:
    a { color: blue;}
    
    a:hover, a:link, a:visited, a:hover, a:active, a:focus { color: red;}
    Or you can force hover to work with elements other than a using some javascript. Just do a search for it in google if you're interested.

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opera can handle :hover just fine. It's just Internet Explorer (5, 5.5 and 6) that can't handle it.

    If you need a CSS based menu, check this one out:
    http://www.sitepoint.com/forums/show...07&postcount=4

    If you have any other questions, feel free to ask. My PM box is always open (I have a vertical menu as well, if that's what you need).

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies.

    The problem that it did not worked in the beginning was due to a overide of the CSS of nice menu with my own stylesheet.....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •