One simple (simplicistic) workaround is keeping the scrollbar always around and be dealt with it
html,body {margin:0;padding:0}
html{overflow-y:scroll}
(use overflow-x
for a layout that uses vh
)
More Related Contents:
- Why does vw include the scrollbar as part of the viewport?
- Element not located at bottom of viewport
- How to change scroll bar position with CSS?
- Add a horizontal scrollbar to an HTML table
- How can I prevent the scrollbar overlaying content in IE10?
- Hide html horizontal but not vertical scrollbar
- Prevent scroll-bar from adding-up to the Width of page on Chrome
- How can I increase a scrollbar’s width using CSS?
- Apply Border-Radius To Scrollbars with CSS
- Transparent scrollbar with css
- with fixed and scrollable [duplicate]
- How to get horizontal scroll bar in select box in IE?
- Scrollbar without fixed height/Dynamic height with scrollbar
- HTML canvas with scrollbar
- Specific order of inline-block elements on mobile and desktop devices
- How to make moving CSS objects like this?
- how to align the image to the center? [closed]
- Why doesn’t height: 100% work to expand divs to the screen height?
- Proper use of flex properties when nesting flex containers
- How can I override Bootstrap CSS styles?
- Nesting block level elements inside the tag… right or wrong?
- Applying a background to and/or
- How to blur(css) div without blur child element [duplicate]
- Using flex order property to re-arrange items for desktop and mobile views
- Create a responsive navbar sidebar “drawer” in Bootstrap?
- CSS3 transition doesn’t work with display property [duplicate]
- Pixels vs. Points in HTML/CSS
- How can I show three columns per row?
- Space between two rows in a table?
- How to play CSS3 transitions in a loop?