techguy2000 techguy2000 - 2 months ago 11
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?


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