LiquidHeight allows you to specify an HTML element that will (automagically) resize itself to fill the available height of the viewport. For instance, imagine the following markup:
<div id="statistics"> <p>2 comments by 2 authors.</p> </div> <div id="comments"> <h2>Comments Section</h2> <ul> <li>I'm a comment!</li> <li>Whoa! I, too, am a comment.</li> </ul> </div> <%= liquid_height :comments %>
The “statistics” div will have it's normal (browser-calculated height), but the “comments” section will expand to fit the entire rest of the viewport.
Copyright © 2008 Centro, released under the MIT license. Authored by: