I get unexpected (for me) behavior when a vertical scrollbar appears. I do not understand that there may be a restriction on the height of the container.
I can solve this problem either by changing the LI: 1 border or set UL lineheight: normal, not 1.
Can someone explain what is really happening? That is, what height is exceeded, why do you need a vertical scrollbar?
I created a very simple JSFIDDLE to illustrate the problem I am having.
HTML code:
<div class="content-section" > <ul > <li>cheese</li> <li>crackers</li> </ul> </div>
CSS code:
body { line-height: 1; } ul { margin: 0; } .content-section { overflow-y: auto; }
source share