I've created a very simple html structure, to represent a div with a button inside:
<div class="side-panel">
<button>
C
</button>
</div>
in my app the wrapping div is a side-panel and the button's purpose is to control the toggle of the side panel. The button is located such that half of it is outside the side panel's div.
The problem is that when I set the .side-panel
with overflow-y:auto
the part of the button that's outside the div is hidden, and I cant figure out why nor how to make it visible while keeping the overflow y Behavior.
here is a working snippet
.side-panel {
position: absolute;
background: blue;
right: 0;
bottom: 0;
overflow-y: auto;
width: 53px;
height: 200px;
box-shadow: inset 1px 0px 0px var(--grandma);
}
button {
position: relative;
top: 24px;
right: 15px;
background-color: #fff;
border-radius: 50%;
height: 30px;
width: 30px;
}
<div class="side-panel">
<button>
C
</button>
</div>
with the problem