J2913 Posted August 18, 2015 Share Posted August 18, 2015 (edited) Hello, I need help regarding the rules in coding this: If my terms are correct then here is my question: How do you combine the same style for the "a" element with different selectors? .class = selector a = element ?? First, I had this. .top a { color: inherit; text-decoration: none;} Then I added 2 more classes. .topleft {}.topright {} I'm trying to have an effect for all three classes that the link would have no textual effect once clicked. I tried this: .top.topleft.topright a { color: inherit; text-decoration: none;} Which did not result in what I had hoped. How would you code this without having to do this: .top a { color: inherit; text-decoration: none;}.topleft a { color: inherit; text-decoration: none;}.topright a { color: inherit; text-decoration: none;} Edited August 18, 2015 by J2913 Link to comment Share on other sites More sharing options...
Ingolme Posted August 18, 2015 Share Posted August 18, 2015 You can chain multiple selectors using the comma: .top a,.topleft a,.topright a { color: inherit; text-decoration: none;} 2 Link to comment Share on other sites More sharing options...
J2913 Posted August 18, 2015 Author Share Posted August 18, 2015 Thank you! 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