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

94
Views
Navigation menu is showing on top of the website, even though it's translated it up

Here is a video of the issue. And not sure why this problem is occurring when I decrease the height in responsive design mode. Beginner web developer, any help appreciated.

.main-navigation {
  position: absolute;
  height: 100%;
  top: -100%;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fffefc;
  transform: translateY(0);
  transition: all 500ms;
}

/* modifier class*/
.navigation-open {
  transform: translateY(100%);
}
const closeButton = document.querySelector(".close-nav-btn");
const openButton = document.querySelector(".open-nav-btn");
const nav = document.querySelector(".main-navigation");

closeButton.addEventListener("click", () => {
  nav.classList.remove("navigation-open");
});

openButton.addEventListener("click", () => {
  nav.classList.add("navigation-open");
});

Let me know if further info is required to help out. (:

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This top: -100% you have means "move the navigation to the top of the containing block's height". When you resize, the containing block's height is becoming smaller than your navigation's height, which is causing this overflow you see. A solution could be doing as below.

Notice I'm animating the height of the navigation, instead its top property.

.main-navigation {
  position: fixed;
  top: 0;
  left: 0;
  width:100%;
  height:0;
  overflow:hidden;
  background-color: #fffefc;
  transition: all 500ms;
}

.navigation-open {
   overflow:auto;
   height: 100vh;
}
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!