Below is the CSS code snippet:
@media (max-width:600) {
body{
background-color:red;
}
}
p{
color:blue;
}
The issue I am facing is that the @media section is not functioning properly. I have tested it on multiple devices, including a PC, and tried adjusting the browser window size. However, when I modify (max-width:600)
to screen
, everything seems to work fine. What could be causing this problem? Moreover, when I add media='max-width:600'
to the <link>
tag, it crashes the CSS entirely - what does this mean?
By the way, the code snippet provided, including the addition of media='....'
, works within the codecademy.com codebit environment, but fails to work on my website, where I conducted the testing. ()