How to detect the device orientation using CSS media queries?
CSS to detect screen orientation: @media screen and (orientation:portrait) { … } @media screen and (orientation:landscape) { … } The CSS definition of a media query is at http://www.w3.org/TR/css3-mediaqueries/#orientation