I'm trying to create a class that I can use to hide certain divs on the mobile version of the site. The css that I am using is
@media screen and (max-width: 720px) {.desktop-only { display: none !important; }}
viewport is set to
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
Yet when i view the site on a device with a resolution less than 720px the div is still visible. I cant seem to figure out why its not working. What am I missing? I have tried all of the suggestions listed in Hide div on mobile devices, using CSS but cant seem to figure out what ive done wrong.
Here is a pen to illustrate the issue....resize it to under 720px and the desktop-only div doesnt hide http://codepen.io/anon/pen/vEjvbM