Media query landing page

Hi everyone,
I don’t understand why they don’t find my mediaquery in my page of code.
Please watch my code below

https://codepen.io/freeCodeCamp/pen/MJjpwO

Thanks for your help !

  1. I am moving your pen to an appropriate subforum, please don’t post in #general if there is an appropriate subforum

  2. You need to share your own pen, the link you have shared is of the FreeCodeCamp’s pen with only the test suite

Hi
Ok thank you very much
How can I like my codepen ? it looks when I try to link it, there is nothing inside
thank you very much

Here is my code with the link
I don’t understand why my media query is not recognized
Thanks for the help !

https://codepen.io/aur-lien-gabert/pen/JjdJyNq

1 Like

Hey,

Two things: (1) Your #video declaration doesn’t have a closing curly brace. (2) You don’t have a .main class. If you use .main-content it should work.

#video{
  display:flex;
  margin-left: auto;
  margin-right: auto;
  width: 320px;
  height: 240px;
}
  
@media (max-width: 600px){
    .main-content {
        background-color: lightblue;
    }
}

If you have more questions, please feel free to ask.

1 Like

Thank you so much Michael ! it works

1 Like

Just another question.
I don’t understand why in my animation the #nav-link keep the same position and don’t move. I would like it to start from the bottom of the header and go to it normal position in 1s
Thanks for your help !