Home › Forums › CSS › What does the “>” do in css? › Re: What does the “>” do in css?
February 22, 2012 at 10:25 pm
#97270
Senff
Participant
It refers to direct children of certain elements only. Example:
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
The selector .flexslider .slides > li
will only target the LI’s that are DIRECT descentdants of .slides
, hence the ones with option 1, 2, 3 and 6. The other 2 LI’s (the ones with option 4 and 5) are descendants of a UL within an LI, so not direct LI’s of .slides
.
Without the greater than-sign, all 6 LI’s would be targeted, of course.
Visit http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/ for a lot more of this stuff.