I am going to create a website that uses responsive design. I read some info on css media request. I want the layout of my web page to look different using different devices (like PCs, tablets or smartphones).
If I use a media query to identify a device using the screen width (in pixels), I always worry about whether the new device will use an extremely high ppi screen. Can this device threaten like a tablet or something like a PC?
Another solution using a user agent to categorize a device using userAgent. There is also the problem that if the device does not interpret the javascript penalty, then the page may be broken.
Any great solution that can solve my problems above? Or Which solution is better?
Or am I misunderstanding the method of using media query?
Thanks.
javascript html css responsive-design
benleung
source share