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 trialMegan Zanders
3,623 PointsI am stuck. What am I doing wrong? I thought I set the ID selector and made the proper link in the CSS file.
I am trying to set up an ID selector in the HTML file first. Then I tried to reference it in the CSS file. From what I can see, I am following the prompt. Can someone show me what I am missing? Thanks. Have a nice day.
/* Complete the challenge by writing CSS below */
h1 {
font-size: 62px;
}
#wilderness-landscape {
margin-bottom: 20px;
}
<!DOCTYPE html>
<html>
<head>
<title>Basic Selectors Challenge</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Lake Tahoe, California</h1>
<img id="wilderness-landscape" src="mtn-landscape.jpg" alt="foggy mountains">
</header>
<div>
<h2>Journey Through the Sierra Nevada Mountains</h2>
<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>
</div>
<footer>
All rights reserved to the state of California.
</footer>
</body>
</html>
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsSyntactically there is nothing wrong, but I'm a little confused by your question. There are 5 tasks in this challenge, but none of them ask for an id of wilderness-landscape
to be added, nor do any ask to style that particular id
. So, I'm not sure why you are adding that. ?
Looking at the CSS you have, it looks like you may be on the second task, which simply asks you to style the <img>
element with a bottom margin of 20px.
So, delete the id you added in the HTML that wasn't instructed and just add CSS to the specification of the instructions. Keep in mind that the instructions for tasks are very particular and need to be followed exactly. If you add, delete, modify anything not asked for, the code checker will throw you a Bummer
.
Keep Coding! :)