detect orientation for flowing ipad ebook
i'm working on a flowing epub2 and am trying to invoke different CSS depending on whether the ipad's in portrait or landscape orientation. i've tried linking to the CSS in the head
<link rel="stylesheet" media="all and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:portrait)" href="ipad-portrait.css" />
as well as in the stylesheet itself using:
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:portrait) { .portrait-class {
} }
different stylesheets are loaded based on the device-width so i can create separate ipad and iphone versions of the CSS, but ibooks seems immune to (orientation:x). anyone know if this is/will be supported?
iPad