Eric_Ryk Posted October 5, 2008 Share Posted October 5, 2008 I know you can chain selectors like div.someClass, but is CSS able to chain multiple classes? That is, .title.selected for any title class that is also of the class selected. Is that the proper syntax or does that just select elements with either the title class or the selected class? Is there another syntax that does what I'm looking to do? Quote Link to comment https://forums.phpfreaks.com/topic/127149-multiple-selectors-for-elements/ Share on other sites More sharing options...
xtopolis Posted October 5, 2008 Share Posted October 5, 2008 Have a read on this page: http://www.w3.org/TR/CSS2/selector.html#child-selectors You can stack classes, if that's what you're asking: (separate class names with a space <p class="title selected"></p> Your css code will be applied in top down order. Quote Link to comment https://forums.phpfreaks.com/topic/127149-multiple-selectors-for-elements/#findComment-657725 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.