CSS responsive design - detect portrait display -


i know it's pure css possible adapt stylesheet according screen dimensions, this:

@media (max-width: 959px) {   /* styles smallest viewport widths */ }  @media (min-width: 600px) , (max-width: 959px) {   /* styles mid-tier viewport widths */ }  @media (min-width: 960px) {   /* original css styles */ } 

(source)

is pure css possible check on landscape or portrait display?

yes, using following syntax:

@media , (orientation: landscape) {} 

see w3 specs more information.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -