Posted By

paul66 on 01/27/11


Tagged

css mobile media orientation device mediaquery tablet


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

maltem
diogoweb


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. }
  4.  
  5. @media all and (orientation:landscape) {
  6. /* Style adjustments for landscape mode goes here */
  7. }

Report this snippet  

Comments

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

demo: http://www.mollerus.net/tom/blog/uploads/screen-orientation-css-demo.htm

You need to login to post a comment.