cyberRobot Posted June 1, 2012 Share Posted June 1, 2012 Anyone know why the following media query doesn't work in Firefox 12? <html> <head> <style type="text/css"> p { display:none; } @media (max-width: 460px) { p { display:block; } } </style> </head> <body><p>here</p></body> </html> Note that it works as expected in Chrome and Internet Explorer. Also, the media query example by A List Apart (http://www.alistapart.com/d/responsive-web-design/ex/ex-site-FINAL.html) works in Firefox... Quote Link to comment https://forums.phpfreaks.com/topic/263455-simple-css-media-query-not-working-in-firefox-12/ Share on other sites More sharing options...
cyberRobot Posted June 1, 2012 Author Share Posted June 1, 2012 Well, apparently this may be a problem with the install of Firefox I was using last night. The code works in Firefox 11 and 12 on two other computers. However, the code doesn't seem to work in Internet Explorer 9 on either of these computers--it was working last night though. Quote Link to comment https://forums.phpfreaks.com/topic/263455-simple-css-media-query-not-working-in-firefox-12/#findComment-1350264 Share on other sites More sharing options...
Mahngiel Posted June 1, 2012 Share Posted June 1, 2012 You've likely got syntax errors. Check for any missing ; Quote Link to comment https://forums.phpfreaks.com/topic/263455-simple-css-media-query-not-working-in-firefox-12/#findComment-1350339 Share on other sites More sharing options...
cyberRobot Posted June 1, 2012 Author Share Posted June 1, 2012 You've likely got syntax errors. Check for any missing ; You may be on to something. After adding the proper DOCTYPE, title, etc. to get the HTML to validate, the code works in IE9 now. I'll have to check the real code later. Quote Link to comment https://forums.phpfreaks.com/topic/263455-simple-css-media-query-not-working-in-firefox-12/#findComment-1350351 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.