Change the height of the parent of a visible li
I use a CSS-Menu with this structure:
- <div class="tabs">
- <ul class="menu">
- <li id="item-1">
- <a href="#item-1">Tab 1</a>
- <div><p>
- ..
- </p></div>
- </li>
- <li id="item-2">
- <a href="#item-2">Tab 2</a>
- <div><p>....</p></div>
- </li>
- </ul>
- </div>
Via CSS .tabs will be position:relative and the divs within the li are position:absolute to stack. This works fine.
Unfortunately, in some cases the content of li is too height and overflow the parent. I'm looking for a way to find out the displayed li and this height to apply it on the parent elements (CSS) height.
Is there a way to solve this?