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

CSS

I cant seem to get my head around this...

Hi, I am on the coding task and the question is the following:

"Select the unordered list with the class contact-info and set the font size to 0.9em. Then, remove all margin, padding, and list styling."

I have entered the following code.

.contact-info ul { font-size: 0.9em; margin: 0; padding: 0; list-style: 0; }

And i get back this message " Bummer! Be sure to set the font size to 0.9em."

Is the code not correct???

Please help.

2 Answers

I don't think CSS supports that type of selector (i.e. .class element). You can look at a reference of selectors here. I think what you should do in this case is just select the class contact-info and drop the "ul".

Thanks. It has worked!!! Thanks again.

.contact-info ul is a valid selector. It's a descendant selector and it would select any ul's that are within an element with a class of "contact-info"

It's just not the right selector for this challenge.

just write this code

.contact-info { font-size: 0.9em; margin: 0; padding: 0; list-style: 0 }

When you select the ul with its atributte class "contact-info" you do not have to select ul tag any more. If you still want to select ul tag, you should do it this way:

ul .contact-info { font-size: 0.9em; margin: 0; padding: 0; list-style: 0 }

OK thanks for your help.

The space makes it a descendant selector. It should be ul.contact-info