So there are two divs as below:
/*for ipad portrait and landscape*/
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
.aclass {
display: block;
background-color: antiquewhite;
}
.bclass {
display: none;
}
}
/*for medium device*/
@media only screen
and (min-width : 992px)
and (max-width : 1200px) {
.aclass {
display: none;
}
.bclass {
display: block;
background-color: aquamarine;
}
}
<div class="hidden-xs aclass">div 1</div>
<div class="hidden-xs bclass">div 2</div>
I want aclass
to be applied only in ipad and bclass
to be applied in medium devices like desktop. The problem arises in Ipad landscape mode where bclass
is applied because of the min-width: 992px
, but I want aclass
to be applied here. How do I solve this issue?