My media query just won't work, can anyone see what I've missed? I've tried adding:
- !important; after media query css declarations
- adding css ancestral specificity to media query css declarations
No luck. I have the meta viewport tag in the header. Here's my html:
<!DOCTYPE html>
<html lang="en">
<head>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,700italic' rel='stylesheet' type='text/css' />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href="css/styles.css"/>
<link rel="stylesheet" href="css/jquery.fadeshow-0.1.1.min.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="abc" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="jquery/jquery.fadeshow-0.1.1.min.js" type="text/javascript"></script>
<script>
$(function(){
$('#nav').click(function() {
$(this).toggleClass('open');
});
});
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title</title>
</head>
and the css
.container {
position: relative;
margin: 0 auto;
width: 100%;
max-width: 1024px;
font-family: "Source Sans Pro", sans-serif;
font-weight: 400;
color: #1a1a1a;
line-height: 150%;
}
.content {
position: relative;
padding: 43% 17% 3%;
}
h1 {
font-family: "Source Sans Pro", sans-serif;
font-weight: 700;
font-size: 2.5em;
font-style: italic;
color: #426432;
text-shadow: 0px 0px 1.3em white, 0px 0px 1.3em white, 0px 0px 1.3em white;
line-height: 150%;
text-align: center;
margin-bottom: 50px;
margin-left: -15px;
}
@media screen and (max-width: 500px){
.content {
padding: 43% 5% 3%;
}
h1 {
font-size: 1.65em;
line-height: 150%;
margin-bottom: 30px;
}
.body {
font-size: 1em;
letter-spacing: .01em;
line-height: 150%;
}
}
Any ideas?