Divs do NOT always expand to fill their containers. This is a known bug in the definition of div.
They seem to work correctly if nothing but text is present, but if you put a div inside something else (especially a table cell), or if you put something else (such as an image, or a bunch of br tags) inside the div, then strange things happen. The div shrinks smaller than its container, or expands beyond the bounds of its container. Different browsers often behave in different ways in these cases.
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182