Issue was due to a hidden character in my last media query. My text editor did not pick it up and was just a case of re-writing the media query and containing styles. Windows server was just more sensitive to this than Apache.
Media queries not working on windows server
-
14-07-2023 - |
Question
I have been developing a static HTML site using bootstrap 3 and media queries. It worked fine when working through a simple LAMP stack. However, I handed the exact same files over to our back end .NET guys and the media queries do not work. All code is identical. I'm using a mobile first approach and only the last media query is being executed. Below is how my media queries are structured. I have tried every available syntax for media queries and still no luck...
@media (min-width: 768px) {}
@media (min-width: 992px) {}
@media (min-width: 1200px) {}
Solution 2
OTHER TIPS
Add this meta tag in your html file
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
Hope this one help you
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow