Skip to content Skip to sidebar Skip to footer

Media Queries In Css

I am trying to apply a CSS for tablets. Tablets have larger displays but the pixel density is not as high as on for example the iPhone 4, Samsung Galaxy Nexus etc. Copy

Use the range of device width and you can target the devices easily i know there are lot of devices to target but in general you target the devices this way.

Solution 2:

You can target high pixel-density devices with the min-device-pixel-ratio query like so:

<link rel='stylesheet' href='highres.css' media='all and (-webkit-min-device-pixel-ratio: 2) and (min-device-width: 600px), all and (min-device-pixel-ratio: 2) and (min-device-width: 600px)' />

That would target high-res displays with a width over 600px

Post a Comment for "Media Queries In Css"