Sarah Barlow
Sarah Barlow

Reputation: 55

Can you help me with mobile media queries?

I made the media queries for tablet , but i can't seem to make them work for mobile.

Tablet @media(min-width:768px) and (max-width:1024px) Mobile @media (min-width:480px) and (max-width:767px)

In the mobile queries when I write some changes they don't work.

Upvotes: 0

Views: 92

Answers (1)

Nathan Fries
Nathan Fries

Reputation: 1524

You need to make sure you handle all dimensions. The way you have it now you are ignoring any sizes smaller than 480px. Please see below for some basic media sizes.

/* XL */
@media (min-width: 1200px) { 
    /* style */
}

/* Large */
@media (min-width: 768px) and (max-width: 979px) { 
    /* style */
}

/* Medium */
@media (max-width: 767px) { 
    /* style */
}

/* Small */
@media (max-width: 480px) { 
    /* style */
}

Upvotes: 2

Related Questions