I'm a beginner in web development and facing an issue with my mobile CSS. The strange thing is that when I view it on localhost, everything looks great, but once deployed (tried both Heroku and GitHub), it appears distorted. Even when I make extreme changes to the values, it seems like nothing is reflected in the deployed version.
Here is my code:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
CSS:
@media (max-width: 600px) {
@supports (display: grid){
.super-container {
width: 100%;!important;
max-width: 100%;!important;
}
.container {
width: 90%;!important;
max-width: 100%;!important;
}
.btn2 {
margin-top: 20px;
width: 30%;
flex-direction: column-reverse;
color: black;
}
}
}
I have tried using 'support' and also without it. Adding "!important" didn't seem to have any effect. I ensured all links are HTTPS in the HTML file. I tested it on two different phones, cleared cache, and used three different browsers (Safari, Google Chrome, and Samsung browser).
The desktop version displays correctly.
Visit the site here:
Screenshot comparisons: