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 trialSteven Prescott
19,206 PointsAdd and Style Icons - Challenge 1 of 5
"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'm reviewing and having a bit of trouble with this. Here's my code:
```html
.contact-info ul{
margin: 0;
padding: 0;
list-style: none;
font-size: 0.9em;
}
```
I'm sure it's something simple I'm missing. Here's the challenge: http://teamtreehouse.com/library/add-and-style-icons -Steven
14 Answers
Nachiket Kumar
3,590 PointsThe way you have written your selectors, what you are actually doing is telling the browser to look for a ul
that is inside an element with class contact-info
, which in turn is inside the html
.
Simply saying .contact-info
(an element with the class contact-info
), or if you need to be more specific, ul.contact-info
(an unordered list with the class contact-info
) should be enough. The properties look fine.
pantelisparros
3,700 PointsYou have to erase the ul after the .contact-info and it will work fine.
Amol Wankhede
15,727 Points.contact-info { margin: 0; padding: 0; list-style: none; font-size: 0.9em; }
tamirg
6,201 PointsHi Amol,
Remove the ul after the selector. Just use .contact-info I found that once I removed the ul it allowed me to move forward.
george george
5,755 Pointsul.contact-info { margin: 0; padding: 0; font-size: 0.9em; list-style: none; }
Gonzalo Blasco
11,927 PointsWorking...
.contact-info {
font-size: 0.9em;
margin: 0;
padding: 0;
list-style: none;
}
Steven Prescott
19,206 PointsYou got it right the second time! Thanks
Crystal Jackson
Courses Plus Student 2,017 PointsI've written the following code at the end of the code given:
.contact-info ul{ margin: 0; padding: 0; list-style: none; font-size: 0.9em; }
...and I can't pass question 1 ...what have I done wrong?
Thank you.
Crystal Jackson
Courses Plus Student 2,017 PointsI solved it - thank you!
pantelisparros
3,700 PointsYou are welcome!
Heather Stone
2,658 PointsIt's not working for me :( What selector do you use? I've tried ul .contact-info, ul.contact-info, .contact-info ul, .contact-info but none of them work :(
Heather Stone
2,658 PointsI refreshed it and just .contact-info worked :)
Nachiket Kumar
3,590 PointsHeather Stone, I hope you understood why .contact-info
worked, I think my original answer above makes it quite clear. All your other permutations are selecting different elements, which don't exist.
Wei Niu
4,151 Pointsi do the exactly as what you said,
.contact-info ul{ margin: 0; padding: 0; list-style: none; font-size: 0.9em; }
but it shows "Be sure to set the font size to 0.9em."
I can't get it. where is the mistake?
Nachiket Kumar
3,590 PointsMy original answer will solve this for you, please read it again!
lina Hernandez
4,583 PointsHere is the correct Answer or at least ir work for me ! .contact-info { margin: 0; padding: 0; list-style: none; font-size: 0.9em; }
tamirg
6,201 PointsHi, I have done it correctly per instruction, knowledge and forum and it is still showing as incorrect? Any suggestions? I just read through the forum notes again and realized that I had to remove the ul in order for it to work.
Nachiket Kumar
3,590 PointsNachiket Kumar
3,590 PointsI might have misunderstood- you might have been trying to format the markdown to show code (it should be css, not html).
In which case if your selector is
.contact-info ul
, you are still asking to select aul
inside an element with classcontact-info
.