shortysbest Posted May 20, 2011 Share Posted May 20, 2011 I have a css class: .post-controls li Then I have an element inside of it called: .liked is there a way to have a class that changes the background of post-controls li if the child element is called .liked something like: .liked .post-controls li Quote Link to comment https://forums.phpfreaks.com/topic/237008-pure-css-select-parent-element/ Share on other sites More sharing options...
requinix Posted May 20, 2011 Share Posted May 20, 2011 If the child element? There's only one? You can style the child to take up the entirety of the parent, then style the child - it'll look like the parent changed. Quote Link to comment https://forums.phpfreaks.com/topic/237008-pure-css-select-parent-element/#findComment-1218262 Share on other sites More sharing options...
shortysbest Posted May 20, 2011 Author Share Posted May 20, 2011 can't do that for what I need it for :/ Quote Link to comment https://forums.phpfreaks.com/topic/237008-pure-css-select-parent-element/#findComment-1218269 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.