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 trialLuci Peterson
Full Stack JavaScript Techdegree Student 12,511 PointsIt says i don't have a closing curly bracket but i do have one?
On third step, it says make width of main content 75% of page, I did that within two curly brackets but when I click check work it says I am missing one.
/* Complete the challenge by writing CSS below */
.title {
font-size: 26px;
}
h2 {
font-size: 53px
}
.main-content {
width: 75%
}
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header>
<span class="title">Journey through the Sierra Nevada Mountains</span>
<h1>Lake Tahoe, California</h1>
</header>
<div class="main-content">
<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>
<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>
</div>
</body>
</html>
2 Answers
KRIS NIKOLAISEN
54,972 PointsIt should say don't forget your semicolons
Luci Peterson
Full Stack JavaScript Techdegree Student 12,511 PointsThank you! I didn't realize you needed the semi-colon with only one thing.
Eric Butler
33,512 PointsImportant side-note: while the answer-evaluator dinged you for missing semicolons, you should know semicolons are NOT required on a rule's last declaration in a real CSS file. What you have is perfectly valid CSS.
.anything {
margin: 1em 0;
font-family: sans-serif;
font-size: 16px
}
.whatever {
text-transform: uppercase
}
Both of those semicolon omissions are totally fine, and if you ever minify your CSS, the minifier WILL remove them even if you wrote them there to begin with.
That said, it is A NICE HABIT to be in to always close every declaration with a semicolon, so that you can be free to add declarations after it and generally just be consistent in your coding.
Shanay Murdock
Full Stack JavaScript Techdegree Student 1,048 PointsYour .h2 and .main-content selectors are both missing semi-colons, so that is likely where the problem is occurring.