Currently, I am working on a project where I need the submenu to adjust based on content. The issue is that right now, the submenu has a fixed capacity of 4 items. For example, when you click on 'sale', it displays 4 submenu items perfectly. However, when clicking on 'dashboard', it only shows three items and leaves an empty space.
The problem seems to be related to the height assigned to my label class:
input[type='radio']:checked + label {
height: 325px;
I have tried setting the height to 100% and using overflow:auto, but unfortunately, the height of the submenu does not adjust dynamically as expected.
If anyone has any ideas or suggestions on how I can set the height of the submenu dynamically based on the content, I would greatly appreciate it!
You can view the CodePen for this issue here: https://codepen.io/anon/pen/gwjvvw