Nighina t t Nighina t t - 2 years ago 151
CSS Question

How to set landscape media queries for tab and mobile in css?

I am creating an android app using web view.My app always open in landscape mode.I need different UI for mobile and tab(both in landscape mode).How to set landscape media queries for tab and mobile in css?

Answer Source

For a media query to set to landscape, you need to use the property orientation like this :

@media all and (orientation: landscape) { ... }

To aim only mobile, tabs, computer screens, you need to use the rule screen. So the final result is something like this :

@media screen and (orientation: landscape) { ... }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download