techguy2000 techguy2000 - 1 year ago 156
CSS Question

Why is the vertical scrollbar always visible

Here is my plunker:

div.tooltip {
position: absolute;
text-align: center;
width: 100px;
height: 500px;
padding: 2px;
font: 12px sans-serif;
background: lightsteelblue;
border: 0px;
border-radius: 8px;
overflow-y: scroll;


When you hover the mouse on one of the circles, a tooltip with vertical scrollbar is always visible even when the height is more than enough for the content. Why is vertical scroll always visible. How and I make it show up only when the content actually overflows?

Answer Source

just change overflow-y:scroll to overflow-y:auto;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download