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

98
Views
Why lazy loading sections creates overflow_x

Hello I have a problem I am trying to make my page RWD but the problem is it creates overflow_x when sections are loaded by interSectionObserver, and it causes that positioning on page dies but when it reaches end of the page, everything is fixed. More code can be found on my github but I am not sure do I have permission to paste it.

CSS

.section {
   transition: opacity 1s, transform 1s;
}
.hidden-section {
    opacity: 0;
    transform: translateY(7rem);
}

JS:

        
        _revealSection() {
                const sections = document.querySelectorAll('.section');
                const options = {
                    root: null,
                    threshold: 0.15,
                    rootMargin: "0px",
                }
        
                const showSection = ((entries, observer) => {
                    const [entry] = entries;
                    if (!entry.isIntersecting) return 
                    entry.target.classList.toggle('hidden-section')
                    observer.unobserve(entry.target)
                    
                })
        
                const sectionFadeIn = new IntersectionObserver(showSection, options);
        
                sections.forEach(sec => {
                    sec.classList.add('hidden-section')
                    sectionFadeIn.observe(sec)
                } )
            }

HTML:

    <section class="section" id="section--5">
                <div class="contact">
                    <h1 class="contact__header">Are you ready for an new experience?</h1>
                    <button class=" modal-button contact__button" data-but="4">contact us</button>
                </div>

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

0

Okay the problem was in html and body tag.

html, body {
width: 100;
overflow-x: hidden;
 }
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!