Drezard Posted March 18, 2008 Share Posted March 18, 2008 How come the :hover ending works for: a { ... code } a:hover { ... code } but not for... <style type="text/css"> <!-- .links { color: #000000; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } .links:hover { color: #FFCC00; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> [code] Thanks, Daniel [/code] Quote Link to comment Share on other sites More sharing options...
GameYin Posted March 18, 2008 Share Posted March 18, 2008 Depends on how you write your HTML. This should work... <style type="text/css"> a .links { color: #000000; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } a .links:hover { color: #FFCC00; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } </style> Enjoy. Quote Link to comment Share on other sites More sharing options...
bronzemonkey Posted March 18, 2008 Share Posted March 18, 2008 It depends what browser you are using. The :hover pseudo-class will only work on anchors in IE6 and below but will work on other elements in modern browsers that better implement the css 2.1 specs Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.