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 trialdavid strayer
2,712 PointsDo not understand this challenge...
I do not know what I am doing wrong
a:link {
color: orange;
}
a:visited {
color: steelblue;
a:hover {
color: tomato;
}
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<span>Journey through the Sierra Nevada Mountains</span>
<h1>Lake Tahoe, California</h1>
</header>
<p>
Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
</p>
<a href="#">Find out more</a>
<div>
<h2>Check out all the Wildlife</h2>
<p>
As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of mink, bears, and Bald eagles.
</p>
<a href="#">See the Wildlife</a>
<div>
<h3>From Tents to Resorts</h3>
<p>
Lake Tahoe is full of wonderful places to stay. You have the ability to sleep in the outdoors in a tent, or relax like a king at a five star resort. Here are our top three resorts:
</p>
<ul>
<li><a href="#">Lake Tahoe Resort Hotel</a></li>
<li><a href="#">South Lake Tahoe Resorts</a></li>
<li><a href="#">Tahoe Ski Resort Lodging</a></li>
</ul>
</body>
</html>
11 Answers
Marcus Parsons
15,719 PointsHey David,
You're missing an ending } after your a:visited
selector.
a:link {
color: orange;
}
a:visited {
color: steelblue;
}
a:hover {
color: tomato;
}
Jason Anders
Treehouse Moderator 145,860 PointsYou simply missed a closing } (curly bracket) for you a:visited setting.
Ronald Jackson
9,229 PointsHi David,
Check to make sure you closed the bracket at the end of the :visited pseudo-class. See if that doesn't solve the issue. Good luck!
Ronald
david strayer
2,712 Pointsit was a problem with the 3rd one, tomato.
this was the challenge: Finally, add a new pseudo-class selector that targets all links on hover. Add a color property and set the value to tomato.
this was the "problem": Make sure you're targeting links on ':hover', and setting the color to 'tomato'.
Marcus Parsons
15,719 PointsNo, it was a problem with a missing }. The 2nd task lets you go forward without an ending }, and then the compiler doesn't know what to do when there are not enough } in the correct places. Your code was originally correct except for the missing }.
Gaby Khoe
23,469 PointsYou are missing a closing curly brace }
a:visited { color: steelblue; }
david strayer
2,712 Pointsokay well i have a curly brace and it still does not work
Marcus Parsons
15,719 PointsWell, I literally redid the challenge using your exact code with a } after the rule inside the a:visited
selector and it works just fine.
david strayer
2,712 Pointsthanks for everyone's help :D,
it didn't work the first time but I started over and it seemed to work -_-
david strayer
2,712 Pointshow come for this first challenge (1/3) it did not need the end }?
Marcus Parsons
15,719 PointsIf you have just the one selector (or the missing } comes at the end), it doesn't need a } technically, but once you add more selectors after that, you need a } to separate the selectors.
david strayer
2,712 Pointsah alright man thanks
Marcus Parsons
15,719 PointsIt's okay man. No problem.
mjmj
18,664 Pointsa:visited { color: steelblue; }
Note: Don't get confused with the word "all", in the question.
Jackie Santana
7,403 PointsTHIS TOOK ME 30 MINS TO FIGURE OUT.. YOU ARE WRITING THE CORRECT CODE BUT THEY WANT YOU TO POST THE PREVIOUS CODE YOU WROTE BEFORE LIKE a:link { color: orange; }
a:visited { color: steelblue; AND THIS WILL WORK.
DJay Jelks
1,104 PointsAfter reading through all the answers on this question then come to your comment in ALL caps, I initially was just going to skip over your brilliant synopsis, but by being in all caps in also brought my attention to your words. I read, thank you! The practice session does not give the impression you need to deploy both rules in the same text box.
If it weren't for you, I'd be lost! LOL! Thanks.
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsHey Marcus, How do you post the nice black square with the code all formatted and colored properly?? I've seen most like that and some where the code is just written out in normal type.
Black box much easier to read. ???
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsGo by the code block in the image below. Where you see "css" can be just about any web language i.e. "html", "javascript", "css", "php", etc. Also, be sure to leave a blank space ABOVE the first 3 backticks and BELOW the last 3 backticks.
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsThanks Marcus, I'll have to try that next time I use the forum. :)
Jeff Jacobson-Swartfager
15,419 PointsJeff Jacobson-Swartfager
15,419 PointsGreat answer, Marcus!
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsThanks, Jeff! lol