Posted By

paul66 on 01/27/11


css mobile media orientation device mediaquery tablet

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Device orientation

 / Published in: CSS

These are just two css media queries you may want to use for your website development. With lots of smart-phones, and tablets being able to orientate their screens from landscape to portrait, you may want to include different styles for each. This is how you would go about achieving this.

  1. @media all and (orientation:portrait) {
  2. /* Style adjustments for portrait mode goes here */
  3. }
  5. @media all and (orientation:landscape) {
  6. /* Style adjustments for landscape mode goes here */
  7. }

Report this snippet  


RSS Icon Subscribe to comments
Posted By: diogoweb on May 3, 2011


You need to login to post a comment.