Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
display none in media query not working for menu icon

I am creating a landing page using HTML/CSS and javascript. For media query, max-width: 768px is working fine but when I used media query for min-width: 768px, the display: block, is not removing the menu bar for screen size greater than 768px.

@media screen and(min-width: 768px){

  body{
    margin: 0;
  }

  .nav{
    height: calc( var(--header-height) + 3rem);
  }

  .nav-toggle .nav-close{
    display: none;
  }

}

here .nav-toggle is the hamburger icon class and .nav-close is the class for the cross(X) button. I used display property but it is still showing the toggle.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

it's' all about targeting the right classes

try to inspect via your browser devtools in your targeted size you will probably notice that your css is overridden in this case you can try more specific classes to increase the css specificity or force your css via !important tag

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda