Macpeters Macpeters - 3 months ago 18
CSS Question

How can I get RWD to work for mobile?

I am building a SPA. I have

in index.html, and I've got a few media queries such as:

@media screen and (min-width: 640px){
.sidebar {
width: 20%;
float: left;

When I open the site in Firefox, I'm shown a selection of device sizes, and when I choose the smaller sizes, the RWD shows up. The sidebar slides down, images are smaller, etc. All great. The problem is when I open the site on a mobile phone (android), it's as if I haven't done any of that. Google doesn't recognize the RWD changes either. Am I missing something?


The @media screen bit does work - however the host I was using wasn't allowing it. I've since moved my website, and it's mobile friendly. Just thought I'd leave this here in case anyone else runs into this problem. The hosting was previously done through my school, so I don't have a lot of info to share about it. Moving to a proper host (godaddy, although I don't actually recommend it, since they don't have any server side scripting) fixed the problem without any other changes being made.