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 trialCosmin Iuga
2,352 PointsI'm stuck completing this exercise
Can someone help me find the issue here?
Thanks
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 {
min-height: 20px;
background-repeat: no-repeat;
list-style: none;
margin: 0;
padding: 0;
font-size: 0.9em;
}
.contact-info li a {
display:block;
}
16 Answers
Cosmin Iuga
2,352 PointsYay... It worked... looking at what was the difference...
mikes02
Courses Plus Student 16,968 PointsLooks like it's asking for it on the anchor elements, have you tried:
.contact-info {
list-style: none;
margin: 0;
padding: 0;
font-size: 0.9em;
}
.contact-info li a {
display: block;
min-height: 20px;
background-repeat: no-repeat;
}
Larry Singleton
18,946 Points.contact-info li a { display:block; margin: 0 0 10px 0; }
This doesn't work...
mikes02
Courses Plus Student 16,968 Points.contact-info li a {
display: block;
min-height: 20px;
background-repeat: no-repeat;
background-size: 20px 20px;
padding: 0 0 0 30px;
}
Cosmin Iuga
2,352 PointsHi Mike,
It worked. now I'm stuck on:
With the anchor elements inside the contact-info list still selected, set the background size to 20 pixels square. Then set the left padding to 30 pixels, with all other padding at 0.
Cosmin Iuga
2,352 PointsThank you Mike.
So here's what I have and it fails:
.contact-info { list-style: none; margin: 0; padding: 0; background: 20px; font-size: 0.9em; }
.contact-info li a { display: block; min-height: 20px; background-repeat: no-repeat; background-size: 20px; padding: 0 0 0 30px; }
mikes02
Courses Plus Student 16,968 Pointsbackground-size: 20px 20px;
Cosmin Iuga
2,352 PointsSo it was 0 0 0 30px because we we're looking for the left one. Correct?
mikes02
Courses Plus Student 16,968 PointsRight, in order it is top, right, bottom, left, so 0 0 0 30px is 0 top, 0 right, 0 bottom, and 30px left.
Cosmin Iuga
2,352 Pointsthat's awesome. thank you.
BTW... it's still not working :(
Cosmin Iuga
2,352 PointsSo this is what it's asking me:
With the anchor elements inside the contact-info list still selected, set the background size to 20 pixels square. Then set the left padding to 30 pixels, with all other padding at 0.
Then this is the error that I get:
Bummer! Did you set the background size for contact-info links to 20px?
mikes02
Courses Plus Student 16,968 PointsHmm, I haven't done this particular challenge, but perhaps you could try:
.contact-info a {
display: block;
min-height: 20px;
background: no-repeat;
background-size: 20px 20px;
padding: 0 0 0 30px;
}
mikes02
Courses Plus Student 16,968 PointsLooks like it wanted you to use
.contact-info a
instead of
.contact-info li a
Cosmin Iuga
2,352 Pointsyes... that it looks like... Just noticed that...
Next one is:
With the anchor elements inside the contact-info list still selected, set the bottom margin to 10 pixels. Set all other margins to 0.
mikes02
Courses Plus Student 16,968 PointsSame as padding, think top right bottom left:
margin: 0 0 10px 0;
Cosmin Iuga
2,352 Pointsyes... did that one by my self...
Thank you much...
Larry Singleton
18,946 Points.contact-info a { display: block; min-height: 20px; background-repeat: no-repeat; background-size: 20px 20px; padding: 0 0 0 30px; margin: 0 0 10px 0; }
This finally worked.
mikes02
Courses Plus Student 16,968 PointsBest answer should be selected in this thread so that others facing this challenge know there is an answer within.
Cosmin Iuga
2,352 PointsHere's what it's asking for:
With the anchor elements inside the contact-info list still selected, set a minimum height of 20 pixels. Then add a declaration that will prevent the background from repeating.