I am working on a horizontal navigation menu with two levels; the second level is displayed vertically. The number of items in the second level can vary, sometimes causing the list to extend beyond the browser view. To address this issue, I have used overflow-y:auto
and
max-height:<arbitrary height>px
. However, I now face another problem where the scrollbar clips some vertical space of the overflowed list, resulting in the need for a horizontal scrollbar to display the clipped area.
Is there a way to prevent the scrollbar from clipping part of the list's width? Any advice would be greatly appreciated.
p.s. If you have suggestions for a better title for my question, please let me know as I was struggling to come up with one.