The start of my page is as follows
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Database Reports</title>
<link href='http://fonts.googleapis.com/css?family=Oxygen:400,300' rel='stylesheet' type='text/css'>
<link href='css/style.css' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src="js/selectivizr-min.js"></script>
<![endif]-->
</head>
Then within the body I have several DIVs
<div class="left"></div>
...
<div class="left"></div>
My CSS is as follows
.left {
width: 30%;
float: left;
margin: 5px;
}
.left:nth-child(4) {
clear: both;
}
@media screen and (max-width: 1024px) {
.left {
width: 40%;
}
.left:nth-child(4) {
clear: none;
}
.left:nth-child(3) {
clear: both;
}
}
@media screen and (max-width: 800px) {
.left {
width: 80%;
}
.left:nth-child(4), .left:nth-child(3) {
clear: none;
}
.left:nth-child(2) {
clear: both;
}
}
In Firefox and Chrome, it all works well. In full resolution, there are 3 columns and then a break, 3 columns and then a break etc
When browser resized (smaller) there are 2 columns, a break 2 columns, a break etc.
I have IE8 and if I turn off compatiablity mode, there are 3 columns and then a break (as describe above) but when I resize the browser, nothing happens. It always stays at 3 columns.
When i put compatiablity mode back on (most users in the company will have this) or use IE7, there's no breaking occuring or any responsiveness.
Any advice/help would be greatly appreciated