CSS Target all mobile devices

If you are looking to make a universal CSS rule for all mobile devices then use the following CSS media query:-

@media (pointer:coarse) {
/* custom css for "touch targets" */
@media (hover: none) {
/* custom css for devices where the primary input mechanism cannot hover at all or cannot conveniently hover
@media (hover:none), (hover:on-demand) {
/* custom css for "touch targets" */
/* credit: https://stackoverflow.com/questions/12469875/how-to-code-css-media-queries-targeting-all-mobile-devices-and-tablets/29307143 */

We find that the first media query works best in most cases.

About the Author
css target all mobile devices CSS Target all mobile devices 0da77002febbfe28d15144a57bbcc2c9 s 180 d mm r g


A highly experienced Web Designer / Web Developer (Webflow, WordPress, Weebly & Custom), Front-end / Back-end Developer & New Media Specialist, with extensive knowledge of a wide spectrum of technologies in the Development and Creative Industries, built up over a number of years.