etsted Posted April 5, 2014 Share Posted April 5, 2014 targeting a class inside another class doesnt seem to work for me. .flip3D > .back{ position: absolute; color: #FC0; } Link to comment Share on other sites More sharing options...
davej Posted April 6, 2014 Share Posted April 6, 2014 http://www.w3schools.com/cssref/css_selectors.asp <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>css</title><style>.a{color:red}.b{background-color:blue}.a .b{color:blue;background-color:red}.a > .b{color:yellow;background-color:green}</style></head><body><div class="a"><div><p class="b">Class a grandchild</p></div><p class="b">Class a child</p></div></body></html> Link to comment Share on other sites More sharing options...
Ingolme Posted April 6, 2014 Share Posted April 6, 2014 The ">" selector selects an element that is an immediate child of another. In your example, this would be selected: <div class="flip3D> <div class="back"></div></div> But this wouldn't: <div class="flip3D"> <div> <div class="back"></div> </div></div> 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