understanding min-width and max-width

Tee TrillTee Trill
1 min read

min-width works above

Using the min-width property in CSS. this is the process of instructing the page to perform some particular action when the screen size is given at a specific value and above.

max-width works below

Using the min-width property in CSS. this is the process of instructing the page to perform some particular action when the screen size is given at a specific value and above.

@media (min-width: 390px) {
    .body-container { 
    min-width: 390px;
    }
}

@media (max-width: 1080px) {
    .body-container { 
    max-width: 1080px;
    }
}
0
Subscribe to my newsletter

Read articles from Tee Trill directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Tee Trill
Tee Trill