Ryan Seddon

Ryan Seddon is front-end developer based in Melbourne, Australia. He loves to tinker with CSS, javascript and coming up with new techniques. You can find his discoveries and articles at his blog, The CSS Ninja. You can also follow him on Twitter: @thecssninja.

25 responses to “How to use CSS3 Orientation Media Queries”

  1. Puneet Sahalot

    great..!! css3 is a complete revolution. after reading this I think there is a lot more to discover and know about CSS3. Looking forward to use this trick on my websites. :)

  2. IPhone newbie

    /* Portrait */
    @media screen and (max-width: 320px) {
    body { opacity: 1; }
    }
    /* Landscape */
    @media screen and (min-width: 321px) and (max-width: 480px) {
    body { opacity: 0; }
    }

    don’t work, I tested on iphone, but the
    (orientation:landscape) did work

    thanks

  3. The Ultimate Roundup of 55+ CSS3 Tutorials « qeqnes | Designing. jQuery, Ajax, PHP, MySQL and Templates

    [...] 23. How to use CSS3 Orientation Media Queries [...]

  4. Overview: CSS3 Media Queries » CSS no Lanche - Ingerir CSS na hora do lanche não engorda

    [...] How to use CSS3 Orientation Media Queries [...]

  5. Start Using CSS3 Today: Techniques and Tutorials | ZoooZu.com

    [...] How to use CSS3 Orientation Media Queries For a long time we have been able to specify styles for different media types using CSS, print and screen being the most recognizable. With CSS3 these media types have been extended to allow additional expressions, aka media queries, which gives us greater control on when specific styles should be applied. In this article I will focus on the orientation media query and have a fun demonstration showing how to use it. [...]

  6. Start Using CSS3 Today: Techniques and Tutorials | Web Design Cool

    [...] How to use CSS3 Orientation Media Queries For a long time we have been able to specify styles for different media types using CSS, print and screen being the most recognizable. With CSS3 these media types have been extended to allow additional expressions, aka media queries, which gives us greater control on when specific styles should be applied. In this article I will focus on the orientation media query and have a fun demonstration showing how to use it. [...]

  7. April’s Best Resources for CSS3

    [...] 26. How to use CSS3 Orientation Media Queries [...]

  8. Erken

    What a great demo of the new CSS3 capabilities! As soon as I’ll be working on a mobile website I’ll be heading to your article again! :)

  9. Friday Focus 04/30/10: Paint Me a Pretty Picture | Devlounge

    [...] CSS – How to use CSS3 Orientation Media Queries [...]

  10. Rubén

    Great article. It seems there is still a lot to discover in CSS3

  11. pol

    thank you for opening my eyes on the subject and for the time to write it down and assemble the demo.

    I’ll be back!
    .-= pol´s last blog .."And one more thing. Unobtrusive JavaScript is evil." =-.

  12. Edward

    Nice article thanks.

    We’ve just developed a web app that creates viewports that match specific device dimensions. http://protofluid.com

    It allows for neat testing of css3 media queries in browsers that support it!

  13. P@W

    thank. so useful.

  14. [Web] 連結分享 - 傑夫碎碎唸-有線電視、漫畫、PHP、Pushmail、Blackberry

    [...] How to use CSS3 Orientation Media Queries [...]

  15. Goran

    Thanks for the article.
    Exactly what i needed at the moment for a mobile design.

  16. Hermitbiker

    …. another cool tutorial for using CSS3 orientation media queries, thanks again !!

  17. Skat

    I think the “death” of ie6 and the future release of ie9 are good signs. Web 3.0 is close :)
    .-= Skat´s last blog ..Ultimate Tips for Powerful SEO on your Wordpress Blog =-.

  18. Kartlos Tchavelachvili

    cool example! : )

  19. Kelly Justin

    very well written article………..
    .-= Kelly Justin´s last undefined ..If you register your site for free at =-.

  20. How to use CSS3 Orientation Media Queries | 10 popular

    [...] For a long time we have been able to specify styles for different media types using CSS, print and screen being the most recognizable. With CSS3 these media types have been extended to allow additional expressions, aka media queries , which gives us greater control on when specific styles should be applied. In this article I will focus on the orientation media query and have a fun demonstration showing how to use it view post [...]

  21. Johan de Jong

    Nice article and very usefull for mobile design.

    I’ve found one problem though at your example(s):

    Your first asign a background image to both the html and body tag, and after that you hide or show the body image depending on the orientation or screensize.
    This is very heavy, especially for mobiles, since the connection speed is lower than “normal”.

    I would suggest you only set a default image at the body (for normal views) and overwrite de image when needed. This way you only have to load the image which will be shown, and not all the images… even when not shown.

    1. Ryan

      Yeah it’s purely a tech demo. It was just a different way of showing how to use the orientation media queries.

      The reason I applied it to both html and body was so there was no delay when you first changed the orientation and the transition would be smooth.
      .-= Ryan´s last blog ..How Gmail’s drag and drop works and why it’s not supported in Safari =-.

  22. Kimcool

    Nice Design.The css3 is so great:)
    .-= Kimcool´s last blog ..Big $ucking type =-.

  23. SergeyDruid

    Nice, this helps a lot =) Sometimes some clients want their site to fill the entire page and this take some more time to do it.
    .-= SergeyDruid´s last blog ..SergeyDruiD: "The First Ones" http://sergeydruid.deviantart.com/art/The-First-Ones-160258565 =-.

  24. How to use CSS3 Orientation Media Queries | Testing Wordpress

    [...] 1st Web Designer Relatives of this [...]

Leave a Reply