Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript jQuery Basics (2014) Creating a Simple Lightbox Perform: Part 4

Sergey Blokhin
Sergey Blokhin
9,612 Points

Overlay doesn't move when I scroll page, it stay fixed on the top of the page. How to make it move when I scroll down?

I added Lightbox to the restaurant page which have many dishes, when i scroll down the page and press on images, the overlay is appear on the top of the page so I can't see it, and to see the image I have to scroll up again. How to fix it?

Please post your code so it is easier to help

1 Answer

Sergey Blokhin
Sergey Blokhin
9,612 Points

Thank you. I found that changing position from absolute to fixed helped. #overlay { position: fixed; }