I have been struggling with this for a week. I read a lot of posts / websites / tips and tricks, but I just can't figure it out.
I need to set CSS rules for different screen sizes and orientations. But recognition does not work.
I tried: min-width, max-height, min-height, max-height, min-device-width, max-device-width, min-device-height, max-device-height, orientation: portrait, orientation: landscape , media = "screen only and (max ...", media = "screen and (max ...", media = "(max .."), all kinds of checks, none of this works for all resolutions and orientations .
This is an example:
<link rel="stylesheet" href="css/iscroll.css" />
<link rel="stylesheet" href="css/iscroll_600.css" type="text/css" media="only screen and (max-width: 600px) and (max-height: 1024px) and (orientation: portrait)"/>
<link rel="stylesheet" href="css/iscroll_600.css" type="text/css" media="only screen and (max-width: 1024px) and (max-height: 600px) and (orientation: landscape)"/>
<link rel="stylesheet" href="css/iscroll_1280.css" type="text/css" media="only screen and (max-width: 800px) and (max-height: 1280px) and (orientation: portrait)"/>
<link rel="stylesheet" href="css/iscroll_1280.css" type="text/css" media="only screen and (max-width: 1280px) and (max-height: 800px) and (orientation: landscape)"/>
How can I solve this problem? Thanks
dhcmega
source
share