Search code examples
htmlcssinternet-explorerresponsive-designmedia-queries

Responsive Design It's not working in IE7 and IE8 etc


Hello Friends please help me i have used every way but responsive design it's not working in IE. I have used everything. I have also used css-mediaqueries.js. it's not work please help me

Here I'm giving you my sample html page:

<!DOCTYPE html>
<!--[if IE 7 ]><html class="ie7" lang="en"><![endif]-->
<!--[if IE 8 ]><html class="ie8" lang="en"><![endif]-->
<!--[if IE 9 ]><html class="ie9" lang="en"><![endif]-->
<!--[if !IE]><!--> <html> <!--<![endif]-->

<head>
<!-- Meta -->
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="">
<meta name="author" content="">
<title>Ads View Page</title>
<!-- Mobile Meta -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if IE]> 
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<![endif]-->
<!-- css -->
<link rel="stylesheet" href="inc-media/bsm_style.css">
<link rel="stylesheet" href="inc-media/responsive.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

 <!--[if lt IE 9]>
<script src="inc-media/html5shiv.js"></script>
<script src="inc-media/respond.js"></script>

<![endif]-->

</head>

<body>
<header></header>
</body>
</html>

That's my Responsive and Main Css Responsive css

@charset "utf-8";
/* CSS Document */
@media screen and (min-width: 768px) and (max-width: 979px) {
    header{ background:#FF0000!important;
    }
}
@media screen and (max-width: 767px) {
        header{ background:#069!important;}
}
@media screen and (max-width: 480px) {
    header{ background:#36F!important;}
}

Main Css

/*  Reset Styling
----------------------------------------------------------------------*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, img {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
* {
    outline: none;
    padding: 0px;
    margin: 0px
}
body{
    background:#999;}
header{ width:100%; background:#fff; height:150px; border-bottom:1px soild #333; margin:0px; padding:0px;}

**

Please Tell me My Friends What I am missing between it.


Solution

  • The previous answer should solve the problem, but more important question here is: why would you want it to be responsive on IE7 & IE8?

    The sole purpose of responsive web site is for phones & tablets.

    And the very first mobile Windows device starts with IE10, which means IE7-9 are NOT used on any phone/tablet.

    In other words, making a site responsive on IE7 & 8 simply isn't necessary.