I've been trying to optimize my website for tablet use, and I've run into an issue with my external CSS file. When I include it like this:
<link rel="stylesheet" media="screen and (max-device-width: 960px) and (max-device-height: 1280px)" href="/css/tablets.css" />
the media queries are effective. However, when I utilize max-width
and max-height
, they don't seem to work as expected. It's puzzling because when I attempt to implement media queries for landscape mode, the situation is reversed:
<link rel="stylesheet" media="screen and (max-device-width: 1280px) and (max-device-height: 960px)" href="/css/tablets.css" />
this approach becomes ineffective while using max-width
and max-height
works flawlessly. What could be causing this inconsistency?
I have been conducting tests on an iPad Mini Retina device.