title: resize font to fit in a div (on one line)
body: <p>There have been similar questions asked, but the solutions do mesh with what I'm trying to do.  Basically, I have an article with a title (<code>&lt;h1&gt;</code>).  I don't want to control the length of the title, but I also don't want the title to appear on multiple lines.  Is there a way with css or jQuery to resize text based on the width of a <code>&lt;div&gt;</code> tag?</p>
  
  <p>I know what I would do with pseudocode if I could detect the overlap of the text to the edge of the <code>&lt;div&gt;</code>:</p>
  
  <pre><code>var fontize = $("#title").css("font-size");
  var i = /*remove unit from integer*/
  while( /*text overlaps div*/ ){
      $("#title").css("font-size", --i+"pt");
  }
  </code></pre>
  
  <p>If there's a CSS attribute I can set that would be even nicer, but I can't seem to find one (overflow wouldn't work in this situation).  </p>