Patoshi パトシ
Patoshi パトシ

Reputation: 23455

Why does the scroll bar sometimes shows up and sometimes it doesnt in a chrome extension

If my chrome extension has too much data, a scroll bar shows up and some times it doesnt and just shows a white gap like the screenshot below. Is there a way to disable scroll bars completely? It's currently showing up in my body tag.

enter image description here

Upvotes: 1

Views: 658

Answers (1)

Vash72
Vash72

Reputation: 622

Remove always the scrollbar from the body
If you access with js

 document.documentElement.style.overflow = 'hidden';  // firefox, chrome
 document.body.scroll = "no"; // ie only

If you acess with css

body{
 overflow: hidden;
}

Upvotes: 1

Related Questions