adam84 Posted June 23, 2010 Share Posted June 23, 2010 The problem is that the link doesnt change when I hover over it. The link is green, but nothing happens when I hover over. Any ideas? HTML <a class="nav" href="http//www.google.ca/">Google</a> CSS a.nav{ color: green; } a.nav:hover{ font-weight: bold; cursor: pointer; } Quote Link to comment https://forums.phpfreaks.com/topic/205661-hover-problems/ Share on other sites More sharing options...
joePHP Posted June 23, 2010 Share Posted June 23, 2010 Hi, It works fine in Firefox and IE. Are you sure you don't have any conflicting styles elsewhere? <html> <head> <style type="text/css"> a.nav { color: green; } a.nav:hover { font-weight: bold; cursor: pointer; } </style> </head> <body> <a class="nav" href="http//www.google.ca/">Google</a> </body> </html> Joe Quote Link to comment https://forums.phpfreaks.com/topic/205661-hover-problems/#findComment-1076258 Share on other sites More sharing options...
V Posted June 29, 2010 Share Posted June 29, 2010 use .nav a and .nav a:hover Quote Link to comment https://forums.phpfreaks.com/topic/205661-hover-problems/#findComment-1078563 Share on other sites More sharing options...
haku Posted June 29, 2010 Share Posted June 29, 2010 Sorry V - you were on a roll with your other answers today, but the one you gave there won't work Adam - what are you expecting to happen? The code you have shown us there is perfectly valid. What is it not doing that you are wanting it to do? Quote Link to comment https://forums.phpfreaks.com/topic/205661-hover-problems/#findComment-1078569 Share on other sites More sharing options...
V Posted June 29, 2010 Share Posted June 29, 2010 Lol, sorry. I just never used "a" before the div. I can't think of anything else, the code is like you said valid. Quote Link to comment https://forums.phpfreaks.com/topic/205661-hover-problems/#findComment-1078698 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.