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 trialTomasz Wontor
2,413 PointsProblem with challenge task 1 in "Adding Pages to a Website"
I,m writing: .contact-info ul { font-size: 0.9em; margin: 0; padding: 0; list-style: none; }
And it shows me that my font-size should be 0.9em... This code works on a website. Is it challenge error or is it my code?
2 Answers
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsHi, What your code is saying is 'get the element with the class contact-info then find the ul that comes after it' which will not work. You should use:
ul.contact-info{ font-size: 0.9em; margin: 0; padding: 0; list-style: none; }
Notice how ul is specified 1st. This says to the browser 'Get the unordered list with the class of contact-info'.
This can also be written as simply:
.contact-info{ font-size: 0.9em; margin: 0; padding: 0; list-style: none; }
This says to the browser 'Get the element with the class of contact-info'.
Both of these examples will work, but the 1st more is a bit more specific.
Hope this helps! :)
Tomasz Wontor
2,413 PointsThanks! It really helps :)
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsNo problem glad it made sense :)