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 trial

HTML How to Make a Website Adding Pages to a Website Add Iconography

Shehan Dissanayake
Shehan Dissanayake
19,119 Points

list item problem!

What is the difference between

.contact-info li.phone{ }

and this

.contact-info li. phone{ }

1 Answer

Vladut Astalos
Vladut Astalos
11,246 Points

First selector would select every list item with a class of .phone inside of a parent with a class of .contact-info. Second selector most probably won't work because the syntax is incorrect, that period is not supposed to be after li but at the beginning of phone like this: '.contact-info li .phone' anyway if you write it like this will probably work just fine like the first but won't be as specific. It will select every element with a class of .phone that is children of a li element that is a children of an element with a class of .contact-info.