I have a web application which has an upload feature. I want to disable that button when the page is viewed via ipad.
Is that possible. My thoughts are to check the resolution. But what if the resolution of the device increases?
I have a web application which has an upload feature. I want to disable that button when the page is viewed via ipad.
Is that possible. My thoughts are to check the resolution. But what if the resolution of the device increases?
Try checking the user agent in PHP. See this question. Then, echo comment tags if it matches the expected user agent for an iPad user.
For just iPad related CSS, you can use this:
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
.no-ipad {
display: none;
}
}
Add the class no-ipad
for making the elements not displayed on iPad.
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
.no-android {
display: none;
}
}
Add the class no-android
for making the elements not displayed on Android.