Gekk0 Posted April 22, 2010 Share Posted April 22, 2010 Is this right? .menuItem { padding-right:10px; padding-left:10px; padding-top:5px; padding-bottom:5px; background-color: #abd0e5; border-width: 1px; } .menuItem a:link { padding-right:10px; padding-left:10px; padding-top:5px; padding-bottom:5px; background-color: #abd0e5; border-width: 1px; } .menuItem a:hover { padding-right:10px; padding-left:10px; padding-top:5px; padding-bottom:5px; background-color: #9fc4d9; border-width: 1px; } So the menu item background color is supposed to change when on hover, but it isn't working, my css isn't really what it should be but umm.. yeah Quote Link to comment https://forums.phpfreaks.com/topic/199333-quick-question-hover-on-a-class/ Share on other sites More sharing options...
premiso Posted April 22, 2010 Share Posted April 22, 2010 Post where / how you are using the above items, IE the html tags. Quote Link to comment https://forums.phpfreaks.com/topic/199333-quick-question-hover-on-a-class/#findComment-1046179 Share on other sites More sharing options...
Gekk0 Posted April 22, 2010 Author Share Posted April 22, 2010 I'm building up a menu like this: <div class="menu"> <a href="index.php" class="menuItemSelected">Home</a> <a href="index.php?page=makebooking" class="menuItem">Request A Booking</a> <a href="index.php?page=bookingReq" class="menuItem">Booking Requests</a> <a href="index.php?page=bookings" class="menuItem">Manage Bookings</a> <a href="index.php?page=calendar" class="menuItem">Calendar</a> <a href="index.php?page=vehicles" class="menuItem">Vehicles</a> <a href="index.php?page=users" class="menuItem">Users</a> <a href="index.php?page=settings" class="menuItem">Settings</a> <a href="index.php?action=logout" class="menuItem">Logout</a> </div> Quote Link to comment https://forums.phpfreaks.com/topic/199333-quick-question-hover-on-a-class/#findComment-1046184 Share on other sites More sharing options...
haku Posted April 22, 2010 Share Posted April 22, 2010 You need either: .menu a:hover or .menuItem:hover Quote Link to comment https://forums.phpfreaks.com/topic/199333-quick-question-hover-on-a-class/#findComment-1046189 Share on other sites More sharing options...
Gekk0 Posted April 22, 2010 Author Share Posted April 22, 2010 Ah! perfect, cheers for your help mate! Quote Link to comment https://forums.phpfreaks.com/topic/199333-quick-question-hover-on-a-class/#findComment-1046191 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.