-2

I have seen a lot of blogs and posts on how to identify using @media for pixels and for resolutions. Some small devices have high or low pixel density and I have seen @media css to identify that as well. So is there just a way to simply identify if it is a mobile device or not, regardless of the resolution, by just using @media and checking for inches? If that is not recommended then what is the sure-fire bulletproof way in 2021 to identify if its a mobile device or not?

Chris
  • 945
  • 14
  • 22
  • 1
    No there is not. How large a pixel on a display is, is pretty much impossible to know from a web dev perspective. Also there are millions of different sizes of "mobile" devices out there and a size will not give you a good indication of it being mobile or not. A better way to approach this issue is to look at your design and make the browser smaller and once your design breaks take that as a breakpoint and make a change. – Dominik Aug 07 '21 at 23:28
  • @Dominik thank you! – Chris Aug 07 '21 at 23:40

1 Answers1

0

Well I guess this other stack overflow post basically answers the question as best as possible (at least for Iphone):

iPhone 5 CSS media query

Chris
  • 945
  • 14
  • 22