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

why wont my background turn into the navy color?

/this is my text (note i deleted the bottom half for space). The green background shows up but the other color does not./

<!DOCTYPE html> <html> <head> <Meta charset="utf8"> <title>Chris Ascencio | Entrepanuer, Engineer, and Programmer</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">

/this is from my responsive.css file/ @media screen and (min-width: 480px;) { body { background: navy; } }

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

4 Answers

You need to remove the ';' from (min-width: 480px). It's a simple mistake we all make out of force of habit. haha.

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

If that isn't the best damn service I've had in years. Kudos hombre, it worked. :}

i like HTML and programming, but i just HATE how little mistakes can leave me flustered for hours.

No worries. Anytime. Glad I could help.

Looks like even once you get the code right, it doesn't work in Firefox, but IE does without an issue.

not all color names are supported across all browsers. It's still best to you use hex color codes.

Patrice Anoh
Patrice Anoh
8,577 Points

Another common mistake is forgetting to put the responsive.css file in the CSS folder. It needs to be located in the CSS folder for the css rules to be applied.