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; } 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 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 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? 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. Link to comment https://forums.phpfreaks.com/topic/205661-hover-problems/#findComment-1078698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.