0

I have a <div> that is used to determine the vertical space required by an arbitrary text string. By default, the height of the <div> box grows to accommodate the text, including wrapped lines, etc.

If I increase the font size of the contained text, the <div> height will grow nicely as required.

However, not the other direction. If I reduce the font size, the <div> offsetHeight maintains a high-water-mark value.

True for Firefox and Chrome at least.

Is there a strategy for coercing the browser to adjust downwards?

Ahmet Emre Kilinc
  • 5,489
  • 12
  • 30
  • 42
dkretz
  • 37,399
  • 13
  • 80
  • 138

0 Answers0