title: According a div size to its content
body: <p>I'm currentrly creating a website, and I need to adapt the size of a div according to the offset on one of it childs.
  So, I'm doing it this way :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
        $(document).ready(function(){ 
          if($(sizer)[0].scrollHeight &gt; 500)
          {
              $(maincnt).height( ($(sizer)[0].scrollHeight + 300) );
          }
        });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>But, the problem is that event is no trigged by Firefox. But with chrome it works.
  Is there a cleaner way to accord the div size ? If not, is there a way to make it trigged by Firefox ? Here is my HTML code :</p>
  
  <pre><code>&lt;div id="maincnt" &gt;
  &lt;div style="position:relative;"&gt;
  &lt;div id="sizer" style="position:absolute;top:12px;left:10px;width:750px;"&gt;
     &lt;!-- Dynamically added things --&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Edit : I gave up, i've found another workaround which solve my first problem, not the JQuery one.</p>