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 trialMason Bilbrey
2,749 PointsSetting font size
Challenge: select the unordered list and the class contact-info. Set the margin padding and list style to 0 0 and none. Set the font size to .9em.
CSS looks like this:
.contact-info ul { margin: 0 ; padding: 0; list-style: none; font-size: .9em; }
It's telling me this isn't right even though it looks the exact same way in my work space.
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: 0;
font-size: 0.9em;
}
2 Answers
jason chan
31,009 PointsYou forgot the comma in between .contactinfo and ul
.contact-info, ul {
font-size:0.9em;
margin:0;
padding:0;
list-style:none;
}
Mason Bilbrey
2,749 PointsThanks man this was frustrating the hell out of me. Although now I'm really confused. In all of my CSS on my workspace there is no comma separating elements and classes and yet they all work perfectly. What's the deal? Any idea?
jason chan
31,009 Pointsthe comma just means and.
You want the .contact-info and ul to have the same css rules.
Mason Bilbrey
2,749 PointsMason Bilbrey
2,749 PointsI should add this - I noticed on here my list-style was set to 0, I fixed it and set it to none. The issue with this challenge is it's specifically telling me to set my font-size to .9em which it is!! What's the deal here?