Here is a bit of CSS that has a simple media query.
http://codepen.io/anon/pen/nuxaw
When I shrink the page so that the view port is less than 320, the box turns green. Now if I follow these steps, the browser will be maximized, but the CSS will still be in the state defined by the media query at 320px.
This means the <320 media query is still applied. If you open the debugger though, you'll see that the CSS applied though is the normal CSS. Is this a bug with Chrome?
http://imgur.com/a/TIAAi
Here's an album on imgur that shows the sequence.
This may be the reason why your media queries aren't working. That is to say, you may have declared CSS within your HTML document. So if this is the case, simply go through the HTML document and remove the CSS declared inline.
To override a specific media query rule, append a new css rule after the one you want to override. For example, if the last css rule does not have a media query attached, it will override all previously declared media queries (presuming the same selectors).
Media queries are commonly associated with CSS, but they can be used in HTML and JavaScript as well. There are a few ways we can use media queries directly in HTML.
Media process errors on Android can be triggered by a long list of factors. For example, maybe you're running low on RAM and storage space. Clear the cache, check for updates, remove the SD card and check if the error is gone. As a last resort, reset your device to factory settings.
The fix for this issue is to convince Chrome to update the render on the page. You can do it by resizing, maximizing, or changing a class on the body tag. I've updated to codepen to use a visibilitychange event that fires during tab switching to toggle a class on the body to force Chrome to update the page render.
http://codepen.io/anon/pen/nuxaw
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With