I have a similar need, but I used:
<link rel='stylesheet' media='screen and (max-aspect-ratio: 4/3)' href='css/tall.css' /> <link rel='stylesheet' media='screen and (min-aspect-ratio: 4/3)' href='css/wide.css' />
The only problem was that when I typed 768 x 1024, it displayed correctly, but when I switched to 1024 x 768, I got a blank page. I used a simple css display view, for example:
display:none;
to turn the div on or off, but my question is how can you make a continuous stream without this interruption? at 1024 x 768
I am using this right now:
<link rel='stylesheet' media='screen and (orientation:portrait)' href='css/tall.css' /> <link rel='stylesheet' media='screen and (orientation:landscape)' href='css/wide.css' />
I would like to use max-aspect-ratio and what not, because it gives me more control when the change occurs. I mean, I can’t put a coefficient of 1.333 and 1.334 bummer ...
- NEW UPDATE
<link rel='stylesheet' media='screen and (max-aspect-ratio:4/3) and (min-width:0px) and (max-width:1023px)' href='css/tall.css'/> <link rel='stylesheet' media='screen and (max-aspect-ratio:4/3) and (min-width:1025px) and (max-width:9999px)' href='css/tall.css'/> <link rel='stylesheet' media='screen and (min-aspect-ratio:4/3)' href='css/wide.css'/>
I assume I fixed my problem by running the above code, which is disappointing. But it still works, I just need to check on almost every screen to make sure that higher resolutions, which are EXACTLY 4: 3 at the request of "conditions" still show. I tried 2048 x 1536 iPad3 Retina and it appears, I don’t know why 1024 x 768 fails ... but it works with the fix above.
---- UPDATE 2 (I hate to be a pain, but) This seems like the cleanest solution for aspect ratio: 4/3:
<link rel='stylesheet' media='screen and (max-aspect-ratio:4095/3072)' href='css/tall.css'/> <link rel='stylesheet' media='screen and (min-aspect-ratio:4096/3072)' href='css/wide.css'/>