phdphd Posted May 25, 2019 Share Posted May 25, 2019 Hi All, I am presently working on media queries. Is there a reliable way to assess the physical width in inches of the screen ? On my 17-inches laptop, at a 1920-px resolution, I have a web page that displays a series of divs, with 4 divs per row. At a 1366-px resolution, the same page will display 3 divs per row. (Reducing the divs’ size in order to have 4 divs per row would make them less readible.) However, there are screen devices wider than 17 inches, but with a 1366-px resolution. On those screens, displaying 4 divs per row, instead of 3, would be appropriate. Is it possible to play with the physical size of screens in inches ? Thanks ! Quote Link to comment https://forums.phpfreaks.com/topic/308753-physical-width-inches-of-the-screen/ Share on other sites More sharing options...
requinix Posted May 25, 2019 Share Posted May 25, 2019 Don't do that. It won't take into account things like zoom, or people who don't fullscreen their browsers. You want responsive design. 1 Quote Link to comment https://forums.phpfreaks.com/topic/308753-physical-width-inches-of-the-screen/#findComment-1567063 Share on other sites More sharing options...
maxxd Posted May 25, 2019 Share Posted May 25, 2019 requinix is right - don't worry about the physical size of the screen. As monitors are packing more pixels in per inch it doesn't matter at all. I personally use pixel-based breakpoints for my media queries with rem or percentages for element sizing and placement. It's an approach some people disagree with - I've talked to developers that think using rem or em is the only way to go, I've just not really been able to wrap my head around applying rem or em units to a Photoshop file, and I guarantee the designers here won't do it either. Quote Link to comment https://forums.phpfreaks.com/topic/308753-physical-width-inches-of-the-screen/#findComment-1567067 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.