Matthew GiffordBlockedUnblockFollowFollowingDad to August and Hazel. Husband to Angela. Developer at Goldstar. Maker of old fashioneds. http://www.matthewgifford.com/Jan 7, 2016Since you wrote this in 2011, have you found an answer for your last question?Paulo Oliveira1Paulo Oliveira: I compare the height and width of the viewport. If the height is greater than the width, it’s portrait. Otherwise, it’s landscape.