Hi all, I have this menu highlighting when the links are hovered. However, I want the last two links (Login and Register) to have a different hover and background colour - can someone tell me how? I've tried a couple of things. Thanks <ul id="menu1"> <li><a href="index.php">Homepage</a></li> <li><a href="buy.php">Buy</a></li> <li><a href="sell.php">Sell</a></li> <li><a href="find.php">Find </a></li> <li><div style="padding-left: 744px;"><a href="login.php">Login</a></div></li> <li><a href="register.php">Register</a></li> </ul> Code (markup):
Look at this page http://www.w3schools.com/css/css_link.asp Put the properties into two separate classes and assign them to the corresponding links
I have that but I have a major menu built behind it and just wanted different coloured links on the same menu. It's tricky :/ Thanks anyway
you can add a class for those 2 li's and then chage them with css. <ul id="menu1"> <li><a href="index.php">Homepage</a></li> <li><a href="buy.php">Buy</a></li> <li><a href="sell.php">Sell</a></li> <li><a href="find.php">Find </a></li> <li class="last2"><div style="padding-left: 744px;"><a href="login.php">Login</a></div></li> <li class="last2"><a href="register.php">Register</a></li> </ul> Code (markup): Then just use .last2 in css to change what you want. Be aware that you might have to use !important for it to work since the previous code already sets the same properties as the ones you want to change.