mobile device - different background - media query not working
Posted
by
AMC
on Stack Overflow
See other posts from Stack Overflow
or by AMC
Published on 2012-08-29T21:29:39Z
Indexed on
2012/08/29
21:38 UTC
Read the original article
Hit count: 202
This is my first attempt at utilizing a different CSS for mobile devices vs. regular screens. To do this, I'm using-
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
background: url('img/background.jpg') no-repeat center center fixed;
background-size: cover;
height: 100%;
}
However, it doesn't seem to be working (I can only test on iPhones). Any ideas as to why that may be? I've also tried @media all
to no avail.
© Stack Overflow or respective owner