My issue involves a small div with the CSS property overflow:auto;
. However, when the scroll bar appears, it covers up a significant portion of the div. One possible solution is to use overflow:scroll;
, but this can result in an unsightly faded scroll bar appearing even when there is no overflow content. Is there a way to place the scroll bar outside of the div without resorting to overflow:scroll;
? Thank you.
For a demonstration, check out this jsfiddle.
.alphabet {
display: inline-block;
overflow-y: auto;
overflow-x: hidden;
border: 1px solid;
height: 50;
}
<div class = "alphabet">
abcdefgh<br>
ijklmnop<br>
qrstuvwx
</div>