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 trialAmber Cookman
12,662 PointsCan't figure out Challenge task error...
I am stuck on a Challenge task and have tried everything I can think of to troubleshoot, but still can't seem to find where I'm going wrong.
The task was "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."
As far as I can tell, the final code I am showing below should be correct, but it keeps giving me an error that says to be sure I remember to change the font size to 0.9em.
.contact-info ul {
font-size: 0.9em;
margin: 0;
padding: 0;
list-style: none;
}
I have a pounding headache today, so it is entirely possible that I'm overlooking something obvious. I'd been on a roll all day though, and so decided it would be wise to just ask around first.
Thanks for your input!
2 Answers
Janek Rezner
12,973 Pointswhat's funny is that if you were to go:
ul.contact-info {
font-size:0.9em;
margin:0;
padding:0;
list-style:none;
}
it would work (note there's no space between ul and your class)
but if you try to do
.contact-info ul{
font-size:0.9em;
margin:0;
padding:0;
list-style:none;
}
essentially what you're saying is "select all unordered lists that are decendents of the element with a class of contact-info" (so that is why it failed!)
Janek Rezner
12,973 Pointsjust do .contact-info {}
(no need for "ul" in your selector)
Amber Cookman
12,662 PointsAha! Thank you!