media queries max width 320px issue

I have a problem with media queries in a 320px width. I tried the next codes to set the query but browsers don't recognise it, so it doesn't work correctly:

1- @media only screen and (min-width: 320px) {

2- @media (min-width:320 px) and (max-width:480 px)

3- @media (max-width: 320px){

None of them work for me. What am I doing wrong?

THANKS A LOT!

Upvotes: 0

Views: 583

Answers (1)

Yousef Altaf
Yousef Altaf

Reputation: 2773

Try

@media only screen and (min-width:3.33%){
.yourClass{
    width : 20%;
  }
}

And its better that u use % instead of px

Upvotes: -1

Related Questions