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 trialIan Biesinger
2,778 PointsCode Challenge Error
Possibly I am doing this wrong since I'm a newbie but, The challenge is asking me to change font size to 0.9em and remove margins, padding, and list styles. this is my syntax
.contact-info {
font-size: 0.9em;
list-style: none;
margin: 0;
padding: 0;
}
When I press check work it tells me to make sure I changed font size to 0.9em. What am I doing wrong? Thanks
5 Answers
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsHi Ian,
You're super close! I think the issue may be that the CSS you are trying is not applying just to the unordered list with the contact-info
class, but to any element with the contact-info
class.
The following is a bit more specific, and should do the trick:
ul.contact-info {
font-size: 0.9em;
list-style: none;
margin: 0;
padding: 0;
}
Hope that helps!
Wayne Priestley
19,579 PointsHi Ian,
The challenges can sometimes be rather picky, Your code is fine.
This may sound silly but I've sometimes solved problems like this by moving something like font-size down a few lines.
Hope this solves it for you.
EDIT: I see now that the question does say "Select the unordered list with the class contact-info" so as Nathan has said you need to address that too.
Ian Biesinger
2,778 Pointsyup! thanks for the help guys! Just moved it down to the bottom of the code. I had a feeling list-style was interfering with the cascade. Font size at the bottom seemed to do the trick. Thanks again!
Felix Yakubov
17,475 PointsWhen I passed this at the beginning it worked
.contact-info{
list-style: none;
margin: 0;
padding: 0;
font-size:.9em;
}
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsHi Jason Anello ,
Thanks for the feedback, it's good to get additional perspectives how things are working, or not-working as the case may be.
Unfortunately the code-challenge platform can be a little finicky at times. We occasionally see intermittent issues with some of the third-party services we use to communicate the challenge results (these seem to be related to load on their end). Based on our logging, that looks like what may have been happening earlier today (difficult to say with certainty without the full challenge input for this forum topic, but I do see an error spike in logging related to a third-party service involved in code-challenges).
We're always looking for ways we can improve everything we can, and have been considering replacing some of the more problematic 3rd-party services with self-hosted infrastructure to help alleviate these problems. We understand how frustrating it can be to get inconsistent results while you're working on enforcing new concepts!
In any case, thanks again for the feedback, and feel free to reach out to us any time you're experiencing difficulty with our service.
Regards,
Nathan W
Jason Anello
Courses Plus Student 94,610 PointsThanks for the reply back.
Whatever this problem is I think it's probably only affecting a small number of people but there are other posts just like this one where you can literally copy the code in the question and paste it into the challenge and it passes. But for whatever reason, it's not passing for the OP.
I usually suggest refreshing the page and that gets it to pass for some.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Nathan,
It seems to be rare but the code challenges occasionally don't pass with correct code. The original code posted in the question here passes the challenge for me and it has for others. However, it was not passing for Ian. I don't know what causes this. Sometimes students will come back a day later and say their exact same code passed.
This may have happened one time for me too. I seem to remember starting off with incorrect code then fixing it and it wouldn't pass. Then I would copy that code, refresh the challenge, paste it back in and it would pass.
Ian Biesinger
2,778 PointsIan Biesinger
2,778 PointsInteresting, I did not know you could put a sub selector before a class selector. Thanks Nathan.