I have tried so many different ways, but I don’t know how to do either one of these. Please help I have been stuck for like two days.
It keeps telling me I need to have a media query, and also that my #navbar always needs to be at the top of the viewport. (My #navbar is the first element in my body element). Here is my css code so far:
Are you sure you linked the stylesheet properly in the html file?
Also leave a space after the word media.
Your media query isn’t exactly targeting an element either. It more or less is a way to determine if certain CSS selectors should be applied. In your case, if the width is at 100 px.
But you don’t have any selectors, only a rule. The CSS is confused about what you’re trying to do and giving an error.
P.S Please post your actual code instead of a picture of it. You can use the “Ask for help” button to do it.
P.P.S Here’s a link so you can read more about media queries. @media - CSS: Cascading Style Sheets | MDN