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!
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!
@illulief
use with media query
@media screen and (min-width: 992px) {
#MainContent {
margin-left: 20%;
margin-right: 20%;
}
}
Thanks
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!