I would normally use absolute positioning and set the top to 50% with a negative margin-top (half of the child's height) to center vertically. In this case that will not work because the child element's height will vary.
So is there a way to vertically center a div within a div without knowing the child's height?