JustRob Posted February 19, 2016 Share Posted February 19, 2016 (edited) So I have defined a style for regular links on my website, and then I have defined a style for links inside the <nav> element... But the links inside the <nav> element still have the color of the regular link style. Does anyone know what's wrong? Here are the styles for my links and my links inside the <nav>: nav a { float: left; padding: 0px 8px; margin: 0px; background: none repeat scroll 0% 0% transparent; font-weight: bold; font-size: 10px; line-height: 20px; text-decoration: none; white-space: nowrap; z-index: 1000; color: #FFF; } a:link { color: #00366C; text-decoration:underline; } a:visited { color: #00366C; text-decoration:underline; } a:hover { color: #00366C; text-decoration:underline; } Edited February 19, 2016 by JustRob Link to comment Share on other sites More sharing options...
dsonesuk Posted February 19, 2016 Share Posted February 19, 2016 Because you are just targeting anchor, not anchor when using :link, :hover, :visited. Link to comment Share on other sites More sharing options...
JustRob Posted February 19, 2016 Author Share Posted February 19, 2016 Oh my god I'm stupid. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now