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 trialRhonda Eisenhauer
1,984 PointsI set the font-size to 1.4rem, as instructed by the challenge on media queries. It tells me the font value isn't right.
I can't figure out what is wrong with the code. I have put everything in as instructed, tried removing spaces and retrying it. Nothing seems to work. Can anyone help me find the mistake?
/* Complete the challenge by writing CSS below */
@media (max-width: 1020px) {
.main-header {
background: tomato;
color: white;
}
@media (max-width: 768px) {
.title {
font-size: 1.4rem;
}
.h1 {
font-size: 5rem;
}
}
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header id="top" class="main-header">
<span class="title">Journey Through the Sierra Nevada Mountains</span>
<h1 class="main-heading">Lake Tahoe, California</h1>
</header>
<div class="primary-content">
<p class="intro">
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 class="callout" href="#more">Find out more</a>
</div><!-- End .primary-content -->
</body>
</html>
4 Answers
Kevin Korte
28,149 PointsIt appears you did not close your first media query before you started your second one.
Rhonda Eisenhauer
1,984 PointsI"ve tried everything and I still cant find the error. Can you show me? I've tried to make sure everything is closed etc, but it keeps telling me the value of the font is wrong. =(
Kevin Korte
28,149 PointsSure...here is the error
/* Complete the challenge by writing CSS below */
@media (max-width: 1020px) {
.main-header {
background: tomato;
color: white;
} /*This closing curly brace for the .main-header class was omitted */
}
@media (max-width: 768px) {
.title {
font-size: 1.4rem;
}
.h1 {
font-size: 5rem;
}
}
Rhonda Eisenhauer
1,984 PointsI went in a re-did it....still wrong! ARRRGGG!! HAHAH!
@media (max-width: 1020px) { .main-header { background: tomato; color: white; } }
@media (max-width: 768px) { .title { font-size: 1.4rem; }
.h1 { font-size: 5rem; } }
Mitchell Springer
2,576 PointsI typed this in and it allowed me to pass The difference was you don't need .h1. h1 isn't a class
@media (max-width: 768px) {
.title {
font-size: 1.4rem;
}
h1 {
font-size: 5rem;
}
}
If it's still not working, maybe reload the challenge.