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 trialJuneau Lim
13,362 PointsInquiry about :odd
Isn't the elements I would be select, not necessarily to be siblings? If that is the case, can I add more than one conditions for :odd?
1 Answer
Steven Parker
231,261 PointsTypically, ":odd
" would be combined with other selectors, but it doesn't restrict the selection to siblings in itself.
Juneau Lim
13,362 PointsJuneau Lim
13,362 PointsWhat I wondered was that if I could use more than one selector with :odd. i.e) (a, li):odd or (ul li):odd(Syntax doesn't make sense but I hope it would explain what I mean.) It's very interesting. Thanks for your answer!
Steven Parker
231,261 PointsSteven Parker
231,261 PointsSome example valid syntax rules might be:
Juneau Lim
13,362 PointsJuneau Lim
13,362 PointsWow thanks for the example! It seems super useful!