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 trialJennifer Andrade
2,074 Pointstrying to figure out the class contact-info, font-size: 0.9em; then remove padding,margin, list styling/?
trying to figure out the class contact-info, font-size: 0.9em; then remove padding,margin, list styling/?
3 Answers
Adam Duffield
30,494 PointsI'm unsure what you mean but to write the CSS code for getting doing this would be like:
css .contact-info{
font-size:0.9em;
padding:0;
margin:0;
list-style-type:none;
}
If your trying to do this within the html page then use this:
class="contact-info" style=" font-size:0.9em; padding:0; margin:0; list-style-type:none;" then your closing tag here
Stone Preston
42,016 Pointsthe task states: 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.
to select an element with a specific class you can use
element.class-name {
}
since the tasks ask you to select an unordered-list with a class of contact info you would use
ul.contact-info {
}
to remove margin, padding and list styling you would just set the margin and padding attributes to 0 inside the selector and set the list-style to none:
ul.contact-info {
font-size:0.9em;
padding:0;
margin:0;
list-style:none;
}
Jennifer Andrade
2,074 Pointsthis was tricky because it was not part of the tutorial and what I followed into my work-space.
the ul. before the contact-info worked
thank you!
Stone Preston
42,016 Pointstechnically selecting the class alone would work too, but the task seems to indicate it wants you to target the ul specifically. but this would work as well
.contact-info {
font-size:0.9em;
padding:0;
margin:0;
list-style:none;
}