check device in css code example Example: detect mobile css @media only screen and (max-device-width: 480px){ /* in mobile css commands */ }