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... 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. 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 ; 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. 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
Archived
This topic is now archived and is closed to further replies.