Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Course Overview 1:49
- Attribute Selectors 8:44
- Styling Form Buttons and Links with Attribute Selectors 3:34
- Attribute Selectors Challenge 3 objectives
- DRY CSS 10:51
- Child, Adjacent, and General Sibling Combinators 9:03
- Combinators Challenge 2 objectives
- Attribute Selectors and Combinators Review 5 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Combinators give us the flexibility of targeting any siblings of an element. We can use the greater-than sign (>), plus sign (+), or tilde symbol (~) to make our selectors more specific.
Quick Reference
Using combinators
- The
>
combinator targets a direct child of an element - The
+
combinator targets an element's immediate sibling - The
~
combinator targets all the specified siblings that follow an element
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Cool Beans
6,937 Points2 Answers
-
Sean Fallon
8,516 Points4 Answers
-
Ubo Town
3,227 Points1 Answer
-
Jake Almendarez
Front End Web Development Techdegree Student 4,250 Points1 Answer
-
Shung Chen
6,526 Points1 Answer
-
Delicia Wharton
UX Design Techdegree Student 11,098 Points2 Answers
-
Dwi Andreas Prawiranegara
7,181 Points1 Answer
-
ian izaguirre
3,220 PointsI do not understand the difference between a child and a sibling ?
Posted by ian izaguirreian izaguirre
3,220 Points2 Answers
-
Ben Mohammad
5,659 Points1 Answer
-
Matthew Keys
1,922 Points2 Answers
-
Shahar Golan
819 Points1 Answer
-
deepak sharma
3,844 Pointswhy dont be use margin-right in adjacent selector in .btn + .btn.. and why is it not working
Posted by deepak sharmadeepak sharma
3,844 Points2 Answers
-
Jiho Song
16,469 PointsWhat is the difference between using ~ and just writing down the specific type name? <CSS>
Posted by Jiho SongJiho Song
16,469 Points2 Answers
-
Kailash Seshadri
3,087 Points2 Answers
-
Kailash Seshadri
3,087 Points1 Answer
-
Dylan Carter
4,780 PointsI don't get what the difference is in using the > for children instead of just putting a space like we were doing?
Posted by Dylan CarterDylan Carter
4,780 Points3 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up