top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to make scrollbars visible only when a Div is hovered?

+1 vote
41 views

How to make scrollbars visible only when a Div is hovered? Any sample code would be helpful?

posted Feb 17, 2016 by Salil Agrawal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer
div { overflow:hidden;height:whatever px; }
div:hover { overflow-y:scroll; }

OR

Use overflow: auto. Scrollbars will only appear when needed.

(Sidenote, you can also specify for only the x, or y scrollbar: overflow-x: auto and overflow-y: auto).

answer Feb 18, 2016 by Shivaranjini
Thanks Shivaranjini
Similar Questions
0 votes

Please provide any sample codes..

0 votes

I want to add a menu to my application screens. The menu will have the menu icons which are horizontal scroll-able one menu at a time when left or right arrow pressed.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...