I have a stack of divs inside of each other, all of which have an ID which specifies CSS only.
But for some reason the surrounding DIV tag only expands to it\'s anoi
There are two solutions to fix this:
clear:both
after the last floated tag. This works good.overflow: hidden
Floated elements don’t take up any vertical space in their containing element.
All of your elements inside #albumhold
are floated, apart from #albumhead
, which doesn’t look like it’d take up much space.
However, if you add overflow: hidden;
to #albumhold
(or some other CSS to clear floats inside it), it will expand its height to encompass its floated children.
You have a fixed height on .infohold, so the .albumhold div will only add up to the height of .infohold (20px) + .albumpic (110px) plus any padding or margin which I haven't included there.
Try removing the fixed height on .infohold and see what happens.
Putting a <br clear="all" />
after the last floated div worked the best for me. Thanks to Brent Fiare & Paul Waite for the info that floated divs will not expand the height of the parent div! This has been driving me nuts! ;-}
You probably need a clear fix.
Try this:
What methods of ‘clearfix’ can I use?
You didn't typed the closingtag from the div with id="infohold.