Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Whatever:hover - Not working for me

Options
  • 14-07-2005 5:34pm
    #1
    Registered Users Posts: 2,157 ✭✭✭


    As some of you are aware, IE only supports the CSS :hover attribute on the anchor tag (i.e. a:hover). There is a .htc script that, when included in your stylesheet, it automatically rewrites the hover styles via jscript so that the work in IE. The script is called Whatever:hover.

    If anyone here is familiar with this script, they may be able to help me out. The relevant styles from my CSS file are as follows:
    body {
    		behavior:url("csshover.htc");
    	}
    
    .nav ul {
    	list-style: none;
    	margin: 0px;
    	padding: 0px;
    	width: 100%;
    }
    
    .nav ul li {
    	padding-left: 15px;
    	text-indent: 15px;
    	padding: 5px 0px 5px 0px;
    	border-bottom: 1px solid #333333;
    	background-color: #CCCCCC;
    }
    
    .nav ul li:hover, .nav ul li:hover a {
    	background-color: #999999;
    	color: #FFFFFF;
    }
    

    Yet when I mouse over the list element in IE, it still doesn't do the hover. Any idea where I'm going wrong?


Comments

  • Registered Users Posts: 286 ✭✭fizzy


    hi serbian,

    i have not used that script before and don't have time to look into it right now but if you are trying to do drop down menus, have you tried the suckerfish one from a list apart? http://www.alistapart.com/articles/dropdowns/

    it overcomes the IE li:hover problem too so maybe looking at that article could help you fix the bug with your menu?


  • Registered Users Posts: 2,157 ✭✭✭Serbian


    Hey Fizzy,

    Thanks for the reply. I got whatever:hover to work for me by including it at the end of my stylesheet, go figure. I took a look at the Suckerfish drop menus, but they use explicit JavaScript on the menu to make the hover work for IE so I opted against using their method for whatever:hover as it's a more implicit way of dealing with the hover problem.

    Thanks,

    Serb


Advertisement