divto take up only as much space as its contents require. Normally, this is trivial to do with the
Unfortunately, in IE the
divwas still trying to take up 100% of the available space.
The problem was that the
divhad a few child
divs with their
heightproperty set. This erroneously caused those
divs to expand their width, which expanded the parent as well.
My solution was to switch from
line-heightto get the height I wanted in the child elements. To adapt this for Firefox I needed to put a single non-breaking space in each child