Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Media Inquries Are Not Working Right Like Everybody's

I encountered a problem when coding in media queries CSS. My @media typing in Visual Studio Code is not functioning right like in every other computer. The screenshot im leaving here, I have 8 problems appear in my index.html file and even though I code right with the documentation, the problem contunies. How can I solve this?
Black background is what my teacher’s, it needs to be like this

White background vs is my base

I did not try antthing

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

As Paulie_D said the question needs a minimal reproducible example. This helps other to identify the problem faster and to get better answers.

But the difference between the example media query and yours are the missing {} for the media query, which wraps the demanded selectors.

body {
  background-color: aquamarine;
}

@media (min-width: 319px) and (max-width: 480px) {
  body {
    background-color: lightsalmon;
  }
}

@media (min-width: 481px) and (max-width: 1200px) {
  body {
    background-color: powderblue;
  }
}

@media (min-width: 1201px) and (max-width: 1600px) {
  body {
    background-color: limegreen;
  }
}

@media (min-width: 1601px) {
  body {
    background-color: seegreen;
  }
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading