Reputation: 24061
I'm making a mobile website, in portrait the nav bar is sized nicely with 15px of padding around the top and bottom, but when I switch to landscape mode, it takes up almost half the screen.
What is the best way to go about this so it's smaller?
A separate stylesheet or is there a trick I don't know about?
Upvotes: 1
Views: 2733
Reputation: 168
i use this for my client mobile site and its work correcly :
<link rel="stylesheet" media="all and (orientation:portrait)" href="[css_file]">
<link rel="stylesheet" media="all and (orientation:landscape)" href="[css_file]">
the css file can be same
Upvotes: 1