Viktor
Viktor

Reputation: 137

CSS Media Queries - IE8 still not function

i got a bit careless by provide a website with twitter bootstrap, and i found out that IE8 still not support media queries...

i google and found two solution: http://ghita.org/tipoftheday/css-media-queries-for-ie and http://code.google.com/p/css3-mediaqueries-js/

but both of it, can't solve my problem, as i shown here: http://www.doxadigital.com/scrape/mediaqueries.html (using css3-mediaqueries.js) and http://www.doxadigital.com/scrape/mediaqueries2.html (using css-media-queries-for-ie.js)

any idea how to solve my problem, as my site use several @media

Thanks

Upvotes: 0

Views: 2645

Answers (2)

Mohsen
Mohsen

Reputation: 598

i`m a web developer, i used bootstrap in a press site but it does not worked on IE8, i used css3-mediaqueries.js javascript but still not working. if you want your media query to work with this javascript file add screen to your media query line in css

here is an example :

<meta name="viewport" content="width=device-width" />
<script type="text/javascript" src="css3-mediaqueries.js"></script>

<style>
     @media screen and (max-width:900px) {}
     @media screen and (min-width:900px) and (max-width:1200px) {}
     @media screen and (min-width:1200px) {}
</style>

<link rel="stylesheet" type="text/css" href="bootstrap.min.css">

css Link line as simple as above line.

Upvotes: 0

acconrad
acconrad

Reputation: 3219

First you need to switch to the HTML5 doctype. Second, IE8 does not natively support Media Queries, so you will need to use a JavaScript polyfill such as Respond to allow for responsive elements.

Upvotes: 1

Related Questions