Home > Blockchain >  Make fix (non-moving) dark background
Make fix (non-moving) dark background

Time:12-13

On my website. I have the following page: enter image description here

When you click on the photo of a car, the background becomes darker (typical front-end idea): enter image description here The problem is, it is movable :( See (I scrolled a bit down): enter image description here

So it's a huge issue and needs debugging. How to fix that? How to make background unscrollable or maybe whatever idea you come up with. Thanks!

CodePudding user response:

Hard to guess without any code - but it seems like some kind of lightbox. So try adding

  body { overflow: hidden; }

when the lightbox is open and

  body { overflow: auto;} 

when it is closed.

  • Related