0

I have a strange problem, on my website I have a tab on the right hand side positioned fixed, right:0; that when the viewport becomes less than X wide my media queries set it to display none.

This works fine in all browsers from ie6 up the problem im having however, is when I login to a virtual machine to test this (as my clients all use the web on a VM) the media query no longer seems to be supported and the display is not set to none?

Has anybody come across this problem before or know how I can fix this?

Thanks

Liam
  • 9,725
  • 39
  • 111
  • 209
  • There's just no reason at all that the VM environment would have that effect. What exactly does your code look like? Have you set up a simple test case (like at jsfiddle.net)? – Pointy Jun 19 '12 at 14:24
  • Yes @pointy I've just created a fiddle and tested it, too which the VM environment ignored my media query... http://jsfiddle.net/2xQVf/ – Liam Jun 19 '12 at 14:27
  • Ah hold on a sec - media queries are not supported in IE versions before IE9 [according to caniuse.com](http://caniuse.com/#search=media) – Pointy Jun 19 '12 at 14:31
  • I know i'm using respond.js to cater for that https://github.com/scottjehl/Respond – Liam Jun 19 '12 at 14:35
  • OK well your jsfiddle does not appear to be using that library ... – Pointy Jun 19 '12 at 14:36
  • Also, I'm not sure that that script will pay attention to embedded style sheets. It seems to only look at CSS files imported via `` tags. – Pointy Jun 19 '12 at 14:40
  • Ahh my bad @pointy, I've tried including respond.js with my fiddle but still no luck! My CSS files are also linked – Liam Jun 19 '12 at 14:41
  • Hmm ... well the only thing I can imagine would be that it's some sort of network issue when it tries to fetch the CSS via ajax. Maybe the IE8 developer tools (the script console) shows some relevant errors. – Pointy Jun 19 '12 at 14:43
  • Thanks @Pointy, I get no errors, stuck! – Liam Jun 19 '12 at 14:53
  • Why are you using media only screen instead of just media screen for your media query declaration? Check this great post covering media only, and it says it ignores older user agents, maybe this is the answer for your problem? http://stackoverflow.com/questions/8549529/what-is-the-difference-between-screen-and-only-screen-in-media-queries – Nathaniel Flick Dec 05 '15 at 09:56

1 Answers1

1

Gave up, ended up using conditional statements to say if IE dont bother showing, stupid computers.

Liam
  • 9,725
  • 39
  • 111
  • 209
  • Bizarre issue, but I'll be keeping this in mind. Sorry you tripped over the problem but I'm (perversely) happy to be aware :-) – Pointy Jun 19 '12 at 17:29