Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

163
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!