I have looked at other questions with similar issues and it appears that what's missing in their code is:
<meta name="viewport" content="width=device-width, initial-scale=1">
However, I already have this code implemented but still facing problems with the CSS media query not working.
This is how my style sheet looks like:
.calculator__container {
border: 1px solid black;
border-radius: 3px;
padding: 5px;
text-align: center;
margin-left: 40vw;
margin-right: 40vw;
margin-top: 25vw;
padding-top: 40px;
box-shadow: -9px 4px 21px -2px rgba(0,0,0,0.75);
}
#clear {
background-color: red;
color: white;
};
@media only screen and (max-device-width: 500px) {
.calculator__container {
border: 1px solid black;
border-radius: 3px;
padding: 5px;
text-align: center;
margin-left: 10vw;
margin-right: 10vw;
margin-top: 25vw;
padding-top: 40px;
color: blue;
box-shadow: -9px 4px 21px -2px rgba(0,0,0,0.75);
};
#clear {
background-color: red;
color: pink;
}
}
Any assistance would be greatly appreciated. Can someone please help me?