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 trialloriortiz2
1,166 Pointschallenge 4 of 4
how to do this? says use & following selector .footer &
19 Answers
Jason Anello
Courses Plus Student 94,610 PointsNot sure by "Got it" if you mean you got the answer or got how to post code.
Anyways, they want you to be more specific. It's a div with a class of "footer". So not just any element with a class of footer. Use div.footer &
Amin Khoshzahmat
12,342 PointsCould you type the code here?
loriortiz2
1,166 Pointsasked to target <a> only in .footer div. and says to use & following the selector a { color: blue; .footer & {color: purple;} }
loriortiz2
1,166 Pointssorry indentations did not print. not that comfortable with markdown...
loriortiz2
1,166 Points```a { color: blue; .footer& { color: purple } }
loriortiz2
1,166 Pointsexception
a {
color: blue;
.footer & { color: purple; }
}
loriortiz2
1,166 Pointsexception
```a {
color: blue;
.footer { color: purple; }
}
Amin Khoshzahmat
12,342 Pointsim confused :D can you tell me what state you are in css ? , let me check it out too
loriortiz2
1,166 Pointsscss. Do you see the challenge question no.4 of 4 in advanced nesting? Sorry, trying to indent my code in markdown with 3 back ticks on line before and also after code, but do not know how to make newline...will check cheat sheet again.
Amin Khoshzahmat
12,342 Pointsooops! No, not yet i thought this is css not scss sorry my friend
loriortiz2
1,166 PointsThanks anyway...do you know how to do the back ticks to have the first and last lines show in code?
loriortiz2
1,166 PointsThanks anyway...do you know how to do the back ticks to have the first and last lines show in code?
Amin Khoshzahmat
12,342 Pointsyeah dude, its simple look at your keyboard, above TAB buttom =>> ```
so you should wrap your code between them
like this
<!DOCTYPE html>
<html>
<head>
<title>Structural Pseudo-classes</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
</body>
</html>
Amin Khoshzahmat
12,342 Points<!DOCTYPE html>
<html>
<head>
<title>Structural Pseudo-classes</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
</body>
</html>
loriortiz2
1,166 PointsYeah I know look at my comment I figured out how to format the code with the back ticks but couldn't get them to include top and bottom lines, for some reason. (ps not a dude).
Amin Khoshzahmat
12,342 Pointsoh, accept my apologize princess ^_^ , so after backticks you shouldnt type anything, i mean hit enter for new line break, then insert your code, thse same at the end of codes!
loriortiz2
1,166 Pointsa {
color: blue;.
.footer & { color: purple; }
}
loriortiz2
1,166 Pointsbtw still looking for how to do this right...
loriortiz2
1,166 PointsGot it.. tx
loriortiz2
1,166 PointsThanks, Jason..I meant got how to post code..but after just viewing the @extend section, I noticed that I didn't use the tag div... so just now as I got your response, I figured this answer out too.