Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Orientation media queries in IE 11

Anyone know why IE 11 would ignore orientation media queries? For example the following does not work for me in IE 11...

@media (orientation: landscape) {
    section {
        padding-top: 18%;
    }
    figure {
        width: 33%;
        margin: 0 3% 0 7%;
    }
}

2 Answers

Try adding all or screen.

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

alternatively

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

Actually, I just discovered that it is working when loaded from the server but not when run locally. I wonder why? Thanks for the answer though.

Is the path to that css file correct if on local?

Yeah. It's a relative path and is loading the css locally but ignoring the orientation query. The other media queries work just not the orientation query.