As far as I know, there’s no way for absolutely positioned child elements to affect the height of their statically, or relatively positioned parent elements using only CSS. Either:
- Reorganize so that the child elements remain in the document flow
- Use JavaScript on load of the page to set the height of the parent to the height of the largest child
This issue is common in fade-in/fade-out JavaScript slideshows, and from what I’ve seen either 1) the height of the parent container needs to be defined or 2) the parent container’s height is set dynamically for each slide.