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 trialNaomi Freier
3,627 Pointsi'm trying to make my website responsive using media queries and it's not working. what am I doing wrong?
this is my code:
@media screen and (min-width: 480px) {
body {
background-color: blue;
}
}
@media screen and (min-width: 660px) {
body {
background-color: orange;
}
}
this is what I put into the html:
<link rel="sytlesheet" href="css/responsive.css">
this is in head, underneath all other css file links.
4 Answers
David Bilson
13,819 PointsIt looks like a typo:
<link rel="sytlesheet" href="css/responsive.css">
It should be stylesheet
Ian Suy
6,706 PointsI think you want to use max-width.
Corwyn Wilkey
7,971 PointsDo you have this meta tag included in the head?
<meta name="viewport" content="width=device-width, initial-scale=1">
Corwyn Wilkey
7,971 PointsOh, yep... Good eye @David Bilson! There is a typo in the link. @Naomi Frier, you put "sytlesheet" instead of "stylesheet".
Ian Suy
6,706 PointsIan Suy
6,706 PointsNice catch! I do that all the time.