outa my depth but
shouldnt the browser have the screen porportions via the useragent? Once the browser/tablet is identified a target template filters content for that tablet.
Back in the ustawuzzes is what we did for phones
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep