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

162
Views
Can't hide overflow-x in a media query

I have a header with menu, which is changed to burger menu when screen width is smaller than 650px. After that menu is positioned as absolute and translated to the right. When I click on burger menu it slides into view. Afterwards everything works, but I can't make overflow disappear. I tried to experiment with adding overflow to different parent elements, but to no avail.

Here is the page - https://badgerwannabe.github.io/rocket-sockets/index.html Here is a Github rep with files enter link description here

Would be grateful for any help.

UPD1: Steps to reproduce Go to the website, open Dev Tools and resize the viewport to less that 650px of width, try to scroll to the right and you'll see the problem. Adding overflow to body at this media query does not help

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

0

If you add overflow: hidden to the body element when you open the menu I think that's what you're looking for. If not, can you specify further what overflow you are trying to get rid of?

Edit: based on the comment, if you add overflow-x: hidden to the body tag, that should do it for you.

about 4 years ago · Juan Pablo Isaza Report

0

The issue is happening because of the following elements.

...
<img class="background-line" alt="background-line" src="assets/images/Path 18.png">
...
<img id="mailbox-sm" src="assets/images/Mask Group 4.png" alt="small mailbox">
...

There are two options.

  1. Add overflow-x: hidden to the body element.
  2. Set the correct width to the above elements.
about 4 years ago · Juan Pablo Isaza Report

0

When you translate the menu to the right (ie out of view) you could also set it

display: none;

setting it back to

display: flex

when you want it to slide into view.

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!