css - IE not get responsive screen when open page that deploy on server tomcat, but it work fine when run on eclipse project with IE before deploy -


i create application using spring mvc project. when run project in eclipse , try open page on ie work fine, responsive screen work fine when deploy on server , open page in ie responsive not working.

my css

/*  small devices (tablets, 767px , down)  */ @media and( max-width : 400px ) {      @-webkit-viewport   { width: device-width; } @-moz-viewport      { width: device-width; } @-ms-viewport       { width: device-width; } @-o-viewport        { width: device-width; } @viewport           { width: device-width; }      .item-thumb { height:70vmin;      }     .item-thumb img {         height: 100%;     }     #logo img {         width: 65%;     }     #order-btn {         width: 70%;         margin: 0 auto;     }    } /*  small devices (tablets, 767px , down)  */ @media , ( min-width : 401px ) {      @-webkit-viewport   { width: device-width; } @-moz-viewport      { width: device-width; } @-ms-viewport       { width: device-width; } @-o-viewport        { width: device-width; } @viewport           { width: device-width; }       .item-thumb { height:80vmin;         width: 80%;         margin: 0 auto;     }     .item-thumb img {         height: 100%;     }     #logo img {         width: 50%;     }     #order-btn {         width: 50%;         margin: 0 auto;     }  } /*  small devices (tablets, 768px , up)  */ @media , ( min-width : 761px ) {      @-webkit-viewport   { width: device-width; } @-moz-viewport      { width: device-width; } @-ms-viewport       { width: device-width; } @-o-viewport        { width: device-width; } @viewport           { width: device-width; }      .item-thumb { height:30vmax;      }     #logo img {         width: 30%;     }    } /*  medium devices (desktops, 992px , up)  */ @media , ( min-width : 992px ) {        @-webkit-viewport   { width: device-width; } @-moz-viewport      { width: device-width; } @-ms-viewport       { width: device-width; } @-o-viewport        { width: device-width; } @viewport           { width: device-width; }      .item-thumb { width:100%;         height: 235px;     }     .item-thumb img {         height: 25vmin;     }     #rs_order_sub_title p.right {         text-align: right;     }     #rs_order_sub_title p.left {         text-align: left;     }     .add_cart {         padding: 10px;         text-align: right;     }     #qty_frm {         width: 100px;         margin-left: auto;         padding-right: 10px;     }     #order-btn {         width: 40%;         margin: 0 auto;     }     .center {         width: 550px;         margin: 0 auto;     }     #item_description p {         width: 500px;         margin: 0 auto;         padding: 10px;     }     /* check out width */     #check_out {         width: 500px;         margin: 0 auto;     }     #logo img {         width: 20%;     } } /*  large devices (large desktops, 1200px , up)  */ @media and( min-width : 1200px ) {      @-webkit-viewport   { width: device-width; } @-moz-viewport      { width: device-width; } @-ms-viewport       { width: device-width; } @-o-viewport        { width: device-width; } @viewport           { width: device-width; }      .item-thumb { height:235px;      }     #logo img {         width: 20%;     } } 

i add script in header too

    <script type="text/javascript">   //copyright 2014-2015 twitter, inc.   //licensed under mit (https://github.com/twbs/bootstrap/blob/master/license)   if (navigator.useragent.match(/iemobile\/10\.0/)) {   var msviewportstyle = document.createelement('style')   msviewportstyle.appendchild(    document.createtextnode(      '@-ms-viewport{width:auto!important}'    )   )   document.queryselector('head').appendchild(msviewportstyle)   }     </script> 

any way add

<meta name="viewport" content="width=device-width, initial-scale=1"> 

can me?

i have found solution now. add 1 meta tag header of jsp file:

<meta http-equiv="x-ua-compatible" content="ie=edge" > 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -