video elements shift fix
This commit is contained in:
parent
f7d99ee5fc
commit
c9b4ec26fd
8
static/js/adjustScrollbar.js
Normal file
8
static/js/adjustScrollbar.js
Normal file
@ -0,0 +1,8 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
||||
|
||||
document.body.style.paddingRight = `${scrollbarWidth}px`;
|
||||
|
||||
const navbarHeight = document.querySelector('.navbar').offsetHeight;
|
||||
document.documentElement.style.scrollPaddingTop = `${navbarHeight}px`;
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user