Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda