There is one 100% height div on the page with a scrollbar. More on the page there are no scrollbars at all and are not expected. When you hover the cursor over the div and scroll the wheel, it will scroll, but if you move the cursor away from it and scroll, it will naturally not scroll. How to fix that this particular div always scrolls? Thank you in advance!

  • And the rest of the blocks should be visible on the screen when scrolling occurs? - edem
  • as an idea learn.javascript.ru/mousewheel - Invision
  • @edem, yes. They must be fixed. - Anatoly

1 answer 1

We ask all the blocks that should not be scrolled and should be visible on the screen:

position: fixed; 

In this case, the whole page will be scrolled, along with the necessary div, regardless of the location of the mouse pointer on the page, and the above-mentioned blocks will always be displayed on the screen at the time of scrolling.

  • Then the content from this div will be superimposed on the content from the still divs above and below. Another option would be. Maybe using javascript. I think this problem cannot be solved without him. - Anatoly
  • @ Anatoly ask him the necessary z-index . PS JS here - from the cannon on the sparrows. - edem