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 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. 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 :/ 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
Archived
This topic is now archived and is closed to further replies.