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 trial

HTML How to Make a Website Adding Pages to a Website Add and Style Icons

Incorrect font size

It is saying my code for font size is incorrect. Here is the css code block

.contact-info ul { font-size: 0.9em; margin: none; padding: none; list-style: none; }

2 Answers

Henrik Hansen
Henrik Hansen
23,176 Points

You arr currently slecting an ul element within an element with the .contact-info class. Try selecting ul.contact-info.

The assignment from teamtreehouse is this:

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.

.contact-info ul {
  font-size: 0.9em;
  margin: none;
  padding: none;
  list-style: none;
}

Looks correct to me. Also, I tried ul.contact-info the result was the same.

Not exactly sure why this worked due to how the question was worded but this ended up being the correct answer

.contact-info {
  font-size: 0.9em;
  margin: 0;
  padding: 0;
  list-style: none;
}

Thank you for the help.

Henrik Hansen
Henrik Hansen
23,176 Points

This

ul.contact-info {
/* stuff */
}

would select this ul:

<ul class="contact-info">

While this CSS

.contact-info ul {
/* stuff */
}

would select the <ul> that is located within any element with class="contact-info".

<div class="contact-info">
    <ul></ul>
</div>

You can easily select it with only

.contact-info {
/* stuff */
}
Ajay Kondath
Ajay Kondath
1,901 Points

try not to add ul because I believe .contact-info is the class name for ul and also change the value of margin and padding from none to 0. like the following. .contact-info { font-size: 0.9em; margin: 0; padding: 0; list-style: none; }

Let me know if this helps