How to adjust website width for phone and tablet viewing?

I used this to control the width on my website, but I don’t want it to apply on the phone/tablet. How do I change that?

#MainContent {
margin-left: 20%;
margin-right: 20%;
}

Thanks!

https://illulief.myshopify.com/

@illulief
use with media query

@media screen and (min-width: 992px) {
#MainContent {
margin-left: 20%;
margin-right: 20%;
}
}

Thanks

@illulief

Please add the following CSS code to your assets/base.css bottom of the file.

@media screen and (max-width: 749px) {
#MainContent {
margin-left: auto !important;
margin-right: auto !important;
}
}

@media screen and (min-width: 992px) {
#MainContent {
margin-left: 20%;
margin-right: 20%;
}
}

Thanks!

@dmwwebartisan Why max and min both ?

thanks, this worked like a charm!