<link rel="stylesheet" media="only screen and (max-width:1280px)" href="css/article1280.css">
I'm in the middle of coding my responsive CSS and I realized that the Samsung Galaxy S4 smartphone has a screen resolution of 1080x1920—my 23" monitor is 1920x1080. I've never browsed on this phone (I have an iPhone 3 with a resolution of 320x480 which is what I thought all smartphones were around, somewhere under 800 pixels wide) so I'm a bit perplexed. How am I supposed to create a mobile website for a smartphone with a screen resolution of 1080x1920?
Tested and working!
Make sure you have the viewport meta tag in your head section. Something like this:
This tells the user-agent to take into account the pixel density and rescale accordingly. So your 1080px width Samsung Galaxy S4 will act like a 360px width screen.
When designing on a GS4 it renders as a regular widescreen unless you use the viewport tag in your headers. I posted the example I use to make it responsive @ Samsung Galaxy S4 Responsive Design @media
use
@media screen and (max-device-width: your dimension here)
.Some media queries that you might find useful in this case are:
Here's a link with more info: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
Galaxy S4 reports 360px x 640px to the browser
Aspect ratio is 9/16
Pixel ratio is 3