screenshot of some of the errors in my code
My css code has suddenly been identified as having problems when I tried adding media queries to make my website responsive. It is making things such as colons and curly brackets have errors but I don't understand what I've done wrong
CodePudding user response:
You forgot to put the "and" word.
@media screen and (max-width: 750px) {
/* Your code */
}
CodePudding user response:
Your media query:
@media screen (max-width: 750px) {
/* ... */
}
Is incorrect. The correct media query is as follows:
@media screen and (max-width: 750px) {
/* ... */
}
Note the and
keyword.
CodePudding user response:
Remove screen it is not necessary. If you are only wanting to apply primarily to screens then add the word and after screen.
@media (max-width: 750px) {
or
@media screen and (max-width: 750px) {
CodePudding user response:
Put 'and' between screen
and (max-width: ***)
@media screen and (max-width: 750px) {
/* ... */
}
To make your code even cleaner. Try: css-checker
I created the project css-checker
to further check your CSS code and give hint to improve your code.