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 trialJoelle Arner
3,561 PointsNot sure what I'm doing wrong...
I thought I had everything right but apparently I'm missing something with the width? Anybody have any ideas what I need to correct? Thanks.
/* Complete the challenge by writing CSS below */
@media screen and (max-width: 768px) {
body {
background: #FF6347;
color: white;
}
}
@media screen and (max-width: 480px) {
body {
background-color: #4682B4;
}
@media screen and (min-width: 800px) {
.wrap {
width: 700px;
}
}
<!DOCTYPE html>
<html>
<head>
<title>Media Queries</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrap">
<h1>Hi There!</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi lectus ante, luctus vel euismod ut, suscipit quis ligula. Vestibulum augue ante, semper sit amet congue non, faucibus sit amet lacus.
</p>
<p>
Maecenas lobortis porttitor nisi, quis congue neque porta at. Donec interdum arcu eu ante semper nec venenatis ipsum dignissim. Vestibulum ultricies mi quis lectus suscipit fermentum.
</p>
</div
1 Answer
Hector Castillo
2,620 PointsIn your css you need to close your value of background-color: #4682B4; with a closing bracket "}" like so..
@media screen and (max-width: 480px) {
body {
background-color: #4682B4; }
}
Mark VonGyer
21,239 PointsMark VonGyer
21,239 PointsYou are missing the closing tag on your div