@media all and (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){header{background-image:url('images/header@2x.jpg');background-size:cover;} header #logo{background-image:url('images/logo@2x.png');background-size:contain;} } @media all and (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi) and (max-width:500px){header{} body header #mobilebg{background-image:url('images/header@2x.jpg');background-size:cover;} }