When using CSS
, I can properly align my elements using css with Chrome
. In chrome inspector-> ipad view, all looks as they should be. But when I test it on actual iPad, some CSS
are not applied. I've found ipad specific CSS
media queries as follows,
** /* Safari 7.1+ */ **
_::-webkit-full-page-media, _:future, :root .my-class {
padding-right: 0;
}
**/* Safari 10.1+ */**
@media not all and (min-resolution:.001dpcm) { @media
{
.my-class {
padding-bottom: 0;
}
}}
**/* Safari 6.1-10.0*/**
@media screen and (min-color-index:0)
and(-webkit-min-device-pixel-ratio:0) { @media
{
.my_class {
padding-bottom: 0;
}
}}
Problem is, while they're working fine with portrait mode, There is no specified way for me to apply CSS
into landscape mode. How can I use media queries for landscape mode in real iPad device/safari on iOS? Without affecting any other browser?
Update
I'm not looking for standard media queries like,
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) { /* STYLES */ }
Landscape Mode
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) { /* STYLES */}