媒体查询min-width ie8

时间:2013-10-31 09:11:24

标签: html css3 internet-explorer-8 media-queries

朋友我对IE8有一个奇怪的问题

我正在使用Dreamweaver流体网格布局....仅基于最小宽度的媒体查询

问题是ie8似乎只能使用max-width ..原因未知

我已经尝试过现代化器和css3-mediaquery.js等但没有结果。

<!doctype html>
<!--[if lt IE 7]> <html class="ie6 no-js oldie"> <![endif]-->
<!--[if IE 7]>    <html class="ie7 no-js oldie"> <![endif]-->
<!--[if IE 8]>    <html class="ie8 no-js oldie"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled Document</title>
<link href="css/boilerplate.css" rel="stylesheet" type="text/css">
<link href="css/base.css" rel="stylesheet" type="text/css">
<link href="css/layout.css" rel="stylesheet" type="text/css">

<script src="js/modernizr.custom.49581.js"></script>
<script src="css/respond.min.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>

CSS 只是具有背景颜色的默认DW流体网格布局css

@charset "utf-8";
/* Simple fluid media
   Note: Fluid media requires that you remove the media's height and width attributes     from the HTML http://www.alistapart.com/articles/fluid-images/ 
*/
img, object, embed, video {
    max-width: 100%;
}
/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
width:100%;
}
/*
Dreamweaver Fluid Grid Properties
----------------------------------
dw-num-cols-mobile:     5;
dw-num-cols-tablet:     8;
dw-num-cols-desktop:    10;
dw-gutter-percentage:   25;

Inspiration from "Responsive Web Design" by Ethan Marcotte 
http://www.alistapart.com/articles/responsive-web-design

and Golden Grid System by Joni Korpi
http://goldengridsystem.com/
*/

/* Mobile Layout: 480px and below. */

.gridContainer {
margin-left: auto;
margin-right: auto;
width: 87.36%;
padding-left: 1.82%;
padding-right: 1.82%;
min-height:300px;
background-color:#06F;
}
#LayoutDiv1 {
clear: both;
float: left;
margin-left: 0;
width: 100%;
display: block;
}

/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */

@media only screen and (min-width: 481px) {
.gridContainer {
width: 90.675%;
padding-left: 1.1625%;
padding-right: 1.1625%;
background-color:#960;
}
#LayoutDiv1 {
clear: both;
float: left;
margin-left: 0;
width: 100%;
    display: block;
}
}

/* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */

@media only screen and (min-width: 769px) {
.gridContainer {
width: 88.2%;
max-width: 1232px;
padding-left: 0.9%;
padding-right: 0.9%;
margin: auto;
background-color:#F00;
}
#LayoutDiv1 {
clear: both;
float: left;
margin-left: 0;
width: 100%;
display: block;
}
}

0 个答案:

没有答案