change:
@media only screen and (max-device-width: 480px) { ... }
to:
@media only screen and (max-width: 480px) { ... }
that way your site will respond on a mobile device and on the desktop.
By using max-device-width
those rules will only kick in if the physical device's screen width is less than X px
not if you adjust your browser size. I changed the number to 480px
because that's the standard width of an iphone screen. 320px
is too small.
Also use:
<meta name="viewport" content="width=device-width, initial-scale=1">
the initial-scale
set's the virtual scale created by mobile devices to 100%
, so that your site is viewed properly.