Streaming live at 10am (PST)

How to remove scroll-bar gap on page?

Hello,

I am trying to get an image to align with the edge of the page - at first it works and sits flush against browser edge.

However when I start scrolling, it adds a gap between browser edge and image for the scroll bar.

Please see image of what I mean here.

Does anyone know how to fix this so it sits flush against edge of page even when scroll bar is there?

(By the way, at first it sits under scroll bar as desired, but if you scroll up and down a bit it pops it out like in image above.)

Thanks!
Phil


Here is my site Read-Only: https://preview.webflow.com/preview/phillips-blank-site-c333df?utm_medium=preview_link&utm_source=dashboard&utm_content=phillips-blank-site-c333df&preview=70030dbbc07985b643a6de5229a55941&mode=preview
(how to share your site Read-Only link)

The gap is because your layout works “fine” only for specific size of image and specific range width of screens.

Example:

Solution

One way to solve this: Add text-align: right for the wrapper div.

Done :slight_smile:

Great thank you for this!

2 Likes

Here are some basic points for removing scroll-bar gap on page.
To remove the inner div 's scroll bar,
you can pull it out of the outer div 's viewport by applying a negative margin to the inner div .
Then apply equal padding to the inner div so that the content stays in view.