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 trialKatelyn Flaherty
1,351 Points0.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?
Thomas Beaudry
29,084 PointsI just finished that code challenge: Contact-info { List-style: none; Padding: 0; Margin: 0; Font-size: 0.9em; }
3 Answers
Sebastian Astill
3,629 PointsIt'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
Treehouse Moderator 145,860 PointsThe code checker is looking for the second one you gave as an example. .contact-info {};
:)
Thomas Beaudry
29,084 Pointscontact-info { list-style: none; padding: 0; margin: 0; Font-size: 0.9em; }
Katelyn Flaherty
1,351 PointsThanks 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
3,629 PointsGreat 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.
Steven Parker
231,261 PointsSteven Parker
231,261 PointsI'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.