Embedded CSS Media Queries Not Working

Posted by Greg on Stack Overflow See other posts from Stack Overflow or by Greg
Published on 2014-06-11T15:21:22Z Indexed on 2014/06/11 15:24 UTC
Read the original article Hit count: 195

Filed under:
|
|

I am new to CSS media queries, and I was first trying to get pdf/mp3/mp4 buttons to get centered on this page whenever a mobile device is using it (http://www.mannachurch.org/portfolio-type/recycled-junk/). Keep in mind for that I am using a highly modified wordpress theme.

So I tried experimenting to isolate this issue. However, I don't seem to have any control over using media queries and I can't even perform anything even on this simple HTML file:

<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style type="text/css">

body{background-color: blue;}

@media only screen and (min-device-width : 599px) and (max-device-width : 600px) {
    body {background-color:black;
    }
}

</style>
</head>

<body>
<p>This is an experiment<p/>
</body>

</html>

What am I doing wrong?

© Stack Overflow or respective owner

Related posts about html

Related posts about css