Get firebug for firefox. You can browse the DOM (the HTML structure of the page) and it will highlight elements according to how the "browser's eye" sees them (versus how they look aesthetically).
A few general rules of thumb:
- Children will expand their parent's height as long as they're not floated or absolutely positioned, but...
- You can "clear" a series of floated images http://www.quirksmode.org/css/clearing.html to make the parent element expand
- If you use top positioning for a relatively positioned child element, the browser will still see that element in the exact same place. In other words the height of the parent element will stay the same regardless of where the child is relatively positioned to.
- Using positive or negative margins on a child that is display: block will add or subtract height from its parent