media query w3schools for all devices code example Example: media query @media only screen and (max-width: 600px) { .class { // Your CSS } }