• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Media Types and Media Queries > device-width and device-height Media...

8.4. device-width and device-height Media Queries

device-width and device-height describe the horizontal and vertical measure, respectively, for an output device. They can be applied to the visual and tactile media types, take standard length units and the min- and max- prefixes can be used with them. They differ from the width and height properties in that they correspond to the dimensions of a particular display, rather than the viewport. The difference is akin to that of the size of a browser window versus the size of the full display containing the browser.

The following example sets the media query for devices with a device-width value of 800 pixels, and a device-height of 600 pixels:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint