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 and Style Icons

Katelyn Flaherty
Katelyn Flaherty
1,351 Points

0.9em is 0.9em but isn't being recognized? Am I doing something wrong elsewhere?

The task is asking me to take the unordered list of the class called "contact-info" and make its font size 0.9em, and remove all padding, margin, and list styling. I'm now 98% sure my code is right, but the task keeps saying that my font size is wrong. Is there something wrong with my code, or is the program acting up?

Steven Parker
Steven Parker
230,274 Points

I've noticed that the challenge verifier can sometimes point you in the wrong direction if it misinterprets the nature of your error. If you share the exact code you are supplying to the challenge we can be more thorough in determining the cause of the error.

Thomas Beaudry
Thomas Beaudry
29,084 Points

I just finished that code challenge: Contact-info { List-style: none; Padding: 0; Margin: 0; Font-size: 0.9em; }

3 Answers

Sebastian Astill
Sebastian Astill
3,629 Points

It's hard to say without seeing your code. Perhaps it's how you're selecting the ul? For example, the following are correctly selecting the unordered list with class "contact-info":

ul.contact-info {
}

or

.contact-info {
}

However the following code is selecting an element with the class "contact-info" inside the unordered list element:

ul .contact-info {
}

Did you notice the space? Maybe that's what you're doing in your code. But paste it so we can get a better idea of what's happening.

Jason Anders
Jason Anders
Treehouse Moderator 145,858 Points

The code checker is looking for the second one you gave as an example. .contact-info {};

:)

Thomas Beaudry
Thomas Beaudry
29,084 Points

contact-info { list-style: none; padding: 0; margin: 0; Font-size: 0.9em; }

Katelyn Flaherty
Katelyn Flaherty
1,351 Points

Thanks everyone! This has been resolved. The error in the code was that I needed to use ul.contact-info as the selector - everything else was correct. :)

Sebastian Astill
Sebastian Astill
3,629 Points

Great stuff :). It should also work without specifying the ul (so just .contact-info). ul.contact-info means "the unordered list with class contact-info" while .contact-info on its own means "the element with the class .contact info". This is very different from ul .contact-info (there's a space between "ul" and "contact-info") which means the element with class "contact-info" inside any unordered list". I'm not sure if that makes it any clearer for you but at least you've got it resolved now.