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 trial

CSS How to Make a Website Responsive Web Design and Testing Adding Breakpoints for Devices

Devon Brown
Devon Brown
2,282 Points

Breakpoints not working in browsers?

I have followed the video precisely regarding adding breakpoints. The responsive.css is located in the css file directory and every thing has been saved and all pages have been refreshed numerous times.

Both Safari and Chrome are not recognizing the changes. Please help!!!

Here is my code:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Devon Brown | Designer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/responsive.css">
  </head>

Here is my code from: responsive.css

@media screen and (min-width 480px) {
  body {
    background: navy;
  }
}

@media screen and (min-width 660px) {
  body {
    background: darkgreen;
  }

Thank you!

2 Answers

Devon, it looks like you're missing one last closing brace on the last media query. I fixed code highlighting for you.

Devon Brown
Devon Brown
2,282 Points

Hi Dustin,

I must have missed that when copy/paste to the question. However, I did just realize the actual mistake in my code. In the following: (min-width 480px) should actually be (min-width: 480px).

So frustrating to miss something so simple. Leaving posted for others. Thank you!

add : after min-width

(min-width:480px)