Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Shehan Dissanayake
Shehan Dissanayake
19,118 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.