I am struggling to make a message appear only when the screen is resized. It's puzzling me why my current approach isn't yielding the desired result. Instead of displaying the message only on a shrunk screen, it shows up all the time. I can confirm that the CSS code exists in my source file, but for some reason, my CSS rule isn't being implemented.
css
@media only screen and (max-width: 600px) {
.invisibleMessage: {
display: none;
}
}
html
<p class='invisibleMessage'>Only visible on mobile</p>