Reputation: 4886
I am trying to target small phones like 3 to 3.5 inches for Example:
HTC DESIRE C
using @mediaQUery
but not able to do that .
I could target the standard mobile phone width that is as follow.
@media only screen and (min-device-width : 320px) and (orientation : portrait) {
.bar {
display:none !important;
}
}
@media only screen and (min-width : 321px) and (orientation : landscape) {
/* Styles */
.par {
display:none !important;
}
}
So what I want to do is show the class .par
only when the width of the screen is equivalent to 3inch phones
Upvotes: 1
Views: 657
Reputation: 26
Most of the resolution will fall within 320px
So you have to changes min to below code
@media screen and (max-width: 320px){
/*YOUR CODE */
}
Upvotes: 1