Determining screen dimensions for content

The following guide is designed to help you determine a fixed-width layout for a specific device. If your content will be shown on different sizes of iPad, you can target CSS rules and images using media queries targeted at specific devices or create a fluid layout based on percentages rather than a specific fixed width. 

Hardware pixels, CSS pixels & device pixel ratio

When Apple introduced Retina displays in iPads and iPhones, the pixel dimensions of these devices frequently were significantly larger than most existing full-size monitors while the physical screen sizes of these new devices were much smaller.  

To allow websites to display in a readable way on these screens, Apple created separate concepts for hardware pixels (sometimes referred to as display pixels or screen pixels) and CSS pixels (which are sometimes called software pixels). 

Hardware pixels are the number of individual display pixels (essentially dots of light) that make up a specific screen.  The more individual hardware pixels that a screen has in a given screen size, the higher the resolution and the clearer that display will look.   

If you are packing more pixels into a smaller space, those individual pixels will have to be smaller to fit - this means that the size of a hardware pixel can vary significantly from one device to another. 

CSS pixels, on the other hand, are designed to be roughly the same size across devices.  This allows a layout with specific CSS dimensions to be displayed in a consistent way across screens with similar physical dimensions, but different numbers of hardware pixels making up that screen. 

For devices with high-resolution screens, manufacturers define a device pixel ratio based on their screen size and resolution.  This ratio defines how many hardware pixels make up a CSS pixel. In all of Appleā€™s Retina iPads to date, each CSS pixel is made up of 4 hardware pixels (2 hardware pixels tall and 2 hardware pixels wide), which translates to a device pixel ratio of 2. Older, non-Retina iPads use a device pixel ratio of 1 so hardware pixels equal CSS pixels for these devices.


Layout width

All fixed-width layouts should be based on the CSS pixel width of the device, which we have listed below for iPads currently supported by Kiosk Pro. 

For other devices, you can determine the standard CSS layout width by dividing the horizontal hardware pixel dimensions by the device pixel ratio. For example, the 11-inch iPad Pro in landscape has a hardware pixel resolution of 2388 pixels wide by 1668 pixels tall.  Dividing 2388 by 2 (the device pixel ratio for any Retina screen) results in a standard CSS layout width of 1194 pixels to be used as the base width for any content designed to be shown on that device in landscape mode.  

If you want to define a different CSS pixel width for your layout, Apple allows you to set a custom viewport using a meta viewport tag. While the viewport tag is supported in current versions of iOS and iPadOS, this may change in future versions.  For this reason, we generally recommend basing your layout on the standard CSS pixel width of the device if possible. 


High-resolution images for Retina displays

While your layout should be based on CSS pixels, you can still use high-resolution images for Retina screens.  This works by using an image based on the hardware pixel size of the screen, then using inline HTML, CSS, JavaScript or media queries to resize the image to the proper CSS pixel dimensions using 'width' and 'height' attributes.  

To continue the 11-inch iPad example above, if you wanted to set a full-width header image, this would be defined in the CSS or inline HTML as having a width of 1194 pixels.  The image file used would be double that (based on the device pixel ratio of 2 for Retina screens) with an actual width of 2388 pixels.  

More specific examples of ways to use high-resolution images on Retina displays are available here.


Specific devices

iPads with Retina displays include: 

  • 12.9-inch iPad Pro (2021, 2020, 2018, 2017, 2015)
    • hardware pixels = 2732 x 2048
    • CSS pixels = 1366 x 1024
    • recommended CSS layout width = 1366 pixels in landscape, 1024 pixels in portrait
  • 11-inch iPad Pro (2021, 2020, 2018)
    • hardware pixels = 2388 x 1668
    • CSS pixels = 1194 x 834
    • recommended CSS layout width = 1194 pixels in landscape, 834 pixels in portrait
  • 10.9-inch iPad Air (2020)
    • hardware pixels = 2360 x 1640 in landscape
    • CSS pixels = 1180 x 820
    • recommended CSS layout width = 1180 pixels in landscape, 820 pixels in portrait
  • 10.5-inch iPad Air (2019), 10.5-inch iPad Pro (2017)
    • hardware pixels = 2224 x 1668 in landscape
    • CSS pixels = 1112 x 834
    • recommended CSS layout width = 1112 pixels in landscape, 834 pixels in portrait
  • 10.2-inch iPad (2020, 2019)
    • hardware pixels = 2160 x 1620
    • CSS pixels = 1080 x 810
    • recommended CSS layout width = 1080 pixels in landscape, 810 pixels in portrait
  • 9.7-inch iPad (2018, 2017), 9.7-inch iPad Pro (2016), iPad Air 2 (2014), iPad Air (2013), iPad 4 (late 2012), iPad 3 (early 2012), iPad mini (5th generation, 2019), iPad mini 4 (2015), iPad mini 3 (2014), iPad mini 2 (2013),
    • hardware pixels = 2048 x 1536
    • CSS pixels = 1024 x 768
    • recommended CSS layout width = 1024 pixels in landscape, 768 pixels in portrait

In addition, older iPads with non-Retina screens may still be in use:

  • 9.7-inch iPad 2 (2011), iPad mini (2012)
    • hardware pixels = 1024 x 768
    • CSS pixels = 1024 x 768
    • recommended CSS layout width = 1024 pixels in landscape, 768 pixels in portrait

If you do not see your device above, a full list of iOS devices, including screen size in pixels, is maintained here.  If you need help identifying your iPad, click here.  


Navigation element dimensions

If your design needs to account for the standard on-screen elements of Kiosk Pro, the height dimensions are as follows: 

  • iPad Status Bar: 40 pixels tall (20 pixels on older, non-Retina displays)
  • Address Bar: 88 pixels tall (44 pixels on older, non-Retina displays)
  • Navigation Bar: 88 pixels tall (44 pixels on older, non-Retina displays)

Still stuck? How can we help? How can we help?