css - Why isn't media query working on my blog? -


this blog: blog i've written following code in css:

@media screen , (max-width: 600px){ .title a{ color: red !important; } } @media screen , (max-width: 500px){ header{ display: none !important; } } 

but nothing when open blog in phone. site opens whether open in phone or desktop browser. why so?

you have in header, <meta content="width=1100" name="viewport">

please change to: <meta name="viewport" content="width=device-width, initial-scale=1">

for understanding how meta viewport works see: https://developer.mozilla.org/en/docs/mozilla/mobile/viewport_meta_tag

what happens in code have set "atleast 1100px" width web pages.

by changing device width, web pages wide device.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -