Search
Learn
Share

Forcing/Enabling Scrollbars in some contents

INFO


Forcing Scrollbar to Enable is the Best way to have scroll bar even though theres not content to scroll with.

REASONS


I created this because I made a sidebar that dont have any scrollbars come up with. And theres a simple CSS Code that you need go up with.



Step 1:
Find any Content that you want to have a scrollbar and make Div tag with class called "force-scroll"Main Code (Example with choosed content)

<div class="force-scrollbar">
<aside id="left-sidebar-nav">
(....)
</aside>
</div>



Step 2:
Now you have added a Div tag with classes on it. Now add <style></style> tags between headandbodyNOTE If you have a <style> then skip it.



Step 3:
Lastly, Add this code in style
.force-scrollbar {
overflow: scroll;
}



If you want vertical scrollbar only then do this.

.force-scrollbar {
overflow-y: scroll;
}

REMEMBER: YOU cannot theme a Force-Enabled Scrollbars by enabling it in CSS with just overflow. I Recommended Using Perfect-Scrollbars out there.

Source Code : cxlink.tk ( Just Inspect Element in SideBars)