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 trialutafwgyyva
901 Pointshelp on code challenge
It says to select the anchor elements inside the contact-info list.Then set them to block level elements.
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{
font-size: 0.9em;
margin: 0;
padding: 0;
list-style: none;
}
2 Answers
Ayoub AIT IKEN
12,314 Pointshey there ! you just have to select the anchor elements that are inside the contact-info class, and display in blocks !
.contact-info a {
display: block;
}
Tyler Anyan
2,976 PointsAyoub is CLOSE, here's what you want to do:
.contact-info > a {
display: block;
}
The ">" selector in this case is basically telling the CSS "target all anchor tags that are children of the .contact-info class".
..... actually I take that back, Ayoub is correct as well, my example is just more specific to DIRECT children so not sure who downvoted the previous example; from what I can see it should be right (gave you an upvote to even you out at 0).
Ayoub AIT IKEN
12,314 Pointshey ! actually Tyler Anyan, in this stage where he is, he doesnt even know what a child selector is, I answered according to the level where he is now ;) ! and in the challenge, that is exactly what he is asked to do !
Tyler Anyan
2,976 PointsYa, I saw that after I made my comment, in a way both methods are correct depending on what you want to do but my example would only target direct children. Either way though not sure why someone downvoted you, answer is correct.
Ayoub AIT IKEN
12,314 Pointsyeah, if he reached the advanced selectors, your answer would be the more appropriate :) ! no idea btw ! hhhhh