jQuery .resize() only works when making the window bigger
<p>I'm trying to resize the main content div #inhalt of my website so that it always fills all the space available. Basically I do this by setting a height of <em>total usable height</em> - <em>top position of #inhalt (pixels from top)</em> - <em>padding etc.</em>. This is my javascript/jQuery code:</p>

<pre><code>$(document).ready(function(){
  $("#inhalt").height($("#zentriert").height() - $("#inhalt").position().top - 48);
  $(window).resize(function() {
    $("#inhalt").height($("#zentriert").height() - $("#inhalt").position().top - 48);
  });      
});
</code></pre>

<p>This works fine when I resize the window so that it gets bigger. It doesn't, however, when I make it smaller.</p>

<p>Does anybody have an idea why and what I could do?</p>
