вёрстка – Fixed-element after the zoom goes beyond the screen, there is no way to see the rest.

Question:

Hello. I could not formulate a concise and understandable title.
Situation:
the site has a lightbox with a fixed positioning. Inside climbs out, for example, an image. After zooming in (at least on the desktop, even on the mobile application), the element naturally goes off the screen, but when you try to "scroll to the right" to see the rest of the element, only the main content of the site scrolls, and the fixed element remains in place (which logical).

Question:
How to make it possible to scroll this same fixed-element so that you can see its entire content after the zoom?

I couldn’t find anything in Google, I don’t even know how to correctly formulate a request to it.

Answer:

If there is no mobile version for your site, then I can only advise you to limit the size of your fixed block to the maximum screen height, and scroll inside the wrapper so that you can see the content. Since I don't see your code, I leave only a rough example:

.fixed {
  max-height: 100vh;
  overflow: auto;
}
Scroll to Top