css - Where to write Bootstrap options for ms viewport? -


i working on web application uses bootstrap ui. other browsers looks fine, in ie version 10, ui looks broken.

i found solution on bootstrap official site. suggested below:

put on css , js.

css:

@-ms-viewport       { width: device-width; } @-webkit-viewport   { width: device-width; } @-moz-viewport      { width: device-width; } @-ms-viewport       { width: device-width; } @-o-viewport        { width: device-width; } @viewport           { width: device-width; } 

js

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) } 

so here have done: copied css your_style.css located under css folder => did not work , got no idea insert javascript.

here question/answer explicit instructions

confused bootstrap internet explorer 10 in windows 8 , windows phone 8

one thing suggest though, make sure compatibility mode isn't enabled in ie10.. have had issues in past.

compatibility mode toggle, highlighted in image :

enter image description here


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -