`@media screen and (max-width: 960px) {
display: flex;
justify-content: spacebetween;
height: 80px;
}`
whilst folloiwng a tutorial from brian design as a someone who is trying to learn web development i came across this error which states constantly says my code is invalid giving me errors.For eacho f these erros it says that i should be using a curly bracked on line 2,3,4 but i don’t understand why as the code above it is fine but this one has a problem.I have tried looking online to go find an answer and even read some documentation but i still am struggling to find out the route cause of this problem could someone help me
4
Answers
A rule (a property with a value) must be contained in a ruleset (a selector followed by { then some rules then }).
A ruleset can appear inside or outside of a media query.
Your media query contains rules directly without the required ruleset. (You might be trying to put the media query in a ruleset, which also isn’t allowed).
you need to specify on which element or class you’re adding this css
The error you’re facing is due to a syntax issue in your CSS code. Specifically, in the
@media
query, you have used the valuespacebetween
for thejustify-content
property. However, there is no valid value calledspacebetween
. The correct keyword isspace-between
, with a hyphen between "space" and "between".Here’s the corrected version of your code:
Make sure to use the correct CSS property values as specified in the CSS specifications or documentation.
you need to select the element you want to style too: