I want to make my text change color when the window size gets below 600px:
jsfiddle: http://jsfiddle.net/LgsXT/1/
text:
<div class = "derp">derp derp derp</div>
css:
.derp {
color:red;
}
@media (max-width:600) {
.derp {
color:blue;
}
}
But it's not doing anything. What's wrong?
You need to add a unit to your value in the query otherwise the number has no meaning so it would look like this:
You need a px or other unit for the @media rule. Also, watch those spaces in your HTML, and I would suggest you work up instead of down in screen-size
Here is a more robust fiddle