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 trialChristie Balistrieri
820 PointsHow to set font-size to 0.9em?
My code challenge is saying that I need to set the font-size to 0.9em. Attached is my code. What am I doing wrong?
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
h1, h2 {
color: #fff;
}
nav a {
color: #fff;
}
nav a:hover {
color: #32673f;
}
h1 {
font-family: ‘Changa One’, sans-serif;
font-size: 1.75em;
font-weight: normal;
}
img {
max-width: 100%;
}
#gallery {
margin: 0;
padding: 0;
list-style: none;
}
#gallery li {
float: left;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;
}
nav ul {
list-style: none;
margin: 0 10px;
padding: 0;
}
nav li {
display: inline-block;
}
nav a {
font-weight: 800;
padding: 15px 10px;
}
.profile-photo {
display: block;
margin: 0 auto 30px;
max-width: 150px;
border-radius: 100%;
}
.contact-info ul {
margin: 0;
padding: 0;
list-style: none;
font-size: 0.9em;
}
Christie Balistrieri
820 PointsIt says to add to unordered list with class contact-info
Mireille Pasos
35,469 PointsOh, ok then it could be that in the html you give the ul tag the class contact-info and then in the CSS you use the name of the class only. The way you;re doing it you're targetting an unordered list if it was inside an element with the class contact-info. If you delete the ul part of your CSS code it should work fine. Or if you invert the order and have no spaces between the ul and the class name like so: ul.contact-info
Christie Balistrieri
820 PointsThanks so much. That was what I was doing wrong. All is good now. Appreciate the help.
Lucho Suarez
Courses Plus Student 100 PointsMaybe the css selector is wrong. If it says to add the property to the ul with the contact info class. The css selector should be ul.contact-info instead of .contact-info ul.
1 Answer
Clinton Hopgood
7,825 PointsThis will work.
.contact-info {
font-size: 0.9em;
list-style: none;
margin: 0;
padding: 0;
}
Mireille Pasos
35,469 PointsMireille Pasos
35,469 PointsHello, to what element are you supposed to give that value? Here you're assigning it to the list element, and that looks fine, but maybe the code challenge was asking you to give it somehwere else?