Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSilvia Ramos
Front End Web Development Techdegree Graduate 18,318 PointsSelectors
Hi there,
sorry but I am still getting confused between the difference on these selectors:
>
~
+
the last one kind of make sense, but the other two... I can't still see it.
Thank you
Trevor Tinotenda Manhuwa
Front End Web Development Techdegree Student 2,512 Pointsdiv > p Selects all <p> elements where the parent is a <div> element div + p Selects all <p> elements that are placed immediately after <div> elements p ~ ul Selects every <ul> element that are preceded by a <p> element
1 Answer
Silvia Ramos
Front End Web Development Techdegree Graduate 18,318 PointsHi ya,
Thank you, but these 3 selectos are explained by Guil Hernandez on the course... he does explain it very well but once I started using them, I got confused again :( especially with the first two and I kind of see they do the same thing but target different elements (there it is where I am confused)
Trevor Tinotenda Manhuwa
Front End Web Development Techdegree Student 2,512 Pointsoh!, i have seen these entities, yeah follow the link i sent you, they are included. :)
Trevor Tinotenda Manhuwa
Front End Web Development Techdegree Student 2,512 PointsTrevor Tinotenda Manhuwa
Front End Web Development Techdegree Student 2,512 PointsHie kindly note that you can find a list of all CSS selectors of the links below, along with thier explanations:
https://www.w3schools.com/cssref/css_selectors.asp