Problems with media queries

Hey guys im practicing my media queries and i dont know why after using min-width: 280px all my past code are nulled and the codes in that media query is the only one working. I added another one query with min-width:768px and the code there dont work…Could someone plz help

Hi, it’s the other way around. Right now you are telling it to do something if the min. width is 280 px, and basically any screen will have a min. width of 280 px. You probably want to tell it to do it if the max. width is 280 px??

1 Like

aha didnt know that, but then how should i do it when i want it for the min-width? do i have to add the 280px code to the 780px and vice versa?

One media query would be, at a max. width of 280 px do this. That covers 0 - 280px width.
And the other, at a min. width of 280px and a max. width of 780px do that. That covers 280px - 780px width.

Hope it’s clearer like that!

1 Like

yea its really clear, thanks!!

Glad I could help you :smiley:

1 Like