Sai
Sai

Reputation: 841

how to keep default styles after media queries

I have built a website siavoush-re.co.uk and have used media queries to adjust it to small screens. I first made a default style so the website fits my 1280px screen and then used min width media queries from 240px to my regular size. So it looks something like this

default css 

@media (min-width: 240px) { //style }

@media (min-width: 320px) { //style }

......

@media (min-width: 1280px) { //style }

What I wanted to know is if there is way to undo all the changes done in the previous breakpoints and have it revert to the default style once the width reaches 1280px?

Upvotes: 1

Views: 1256

Answers (1)

Alexander Mistakidis
Alexander Mistakidis

Reputation: 3130

Sounds like you want max-width-- 'change to this css up until this size'.

You can also combine these queries depending on your needs, for example:

/* iPads (portrait and landscape) ----------- */
@media only screen and (min-width : 768px) and (max-width : 1024px) {
/* Styles */
}

Upvotes: 4

Related Questions