I use alot of transition, hover, and shadow effects on the desktop version of my site. I need to get rid of them for my tablet version which I thought I could do with media queries but my issue is when i use something like @media only screen and (min-width : 1224px) to target desktops then a user needs to have their browser window maximized or they get tablet targeted css. So if a desktop users browser is at 1000px then they get the same css as someone on an Ipad. Now I'm told that browser sniffing is unreliable so how else can I differentiate between a user on a 1000px desktop browser and a 1000px tablet device?
As for the desktop version, the best choice is the 1280×720 screen resolution. It is a minimal size for desktop devices. Usually, the desktop version is user-friendly and perfectly readable if the screen resolution width is more than 1280.
The following are some of the most common screen resolution options: Desktop displays, ranging from 1024×768 to 1920×1080. Mobile displays ranging from 360×640 to 414×896. Tablet displays ranging from 601×962 to 1280×800.
According to the Worldwide Screen Resolution Stats (Jan 2020 – Jan 2021), the most commonly used resolutions across mobile, desktop, and tablet are: 1920×1080 (8.89%) 1366×768 (8.44%) 360×640 (7.28%)
Average tablets have a resolution of 1920x1080 pixels.
body {
background-color: #bada55
}
/* Regular media queries for a smaller desktop */
@media only screen
and (min-device-width : 768px)
{
/* Add styles here */
}
/* iPads (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
/* Add styles here */
}
/* iPads (landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* Add styles here */
}
/* iPads (portrait) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
/* Add styles here */
}
Check the example in jsbin - http://jsbin.com/uxipeh/1/ and a full list of options here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With