On 05/01/2007, at 7:12 PM, Paul Bakaus wrote:

> Until then, you can
> just use vJustify!
>
> -Paul

I just used vjustify and found that (for my purposes at least) the  
plugin works better if it sets the min-height instead of the height.  
This way the elements can still expand if the text is sized up or a  
resizing the window with a liquid layout causes the content to flow  
further vertically.

The plugin with my slight changes follows:

jQuery.fn.vjustify=function() {
        var maxHeight=0;
        var minHeight = ($.browser.msie && typeof XMLHttpRequest ==  
'function') ? 'height' : 'min-height';
        this.each(function(){
                if (this.offsetHeight>maxHeight) {maxHeight=this.offsetHeight;}
        });
        this.each(function(){
        $(this).css(minHeight,(maxHeight + "px"));
        if (this.offsetHeight>maxHeight) {
                
$(this).css(minHeight,((maxHeight-(this.offsetHeight-maxHeight)) 
+"px"));
        }
        });
};

Just throwing this out there. Only tested on Mac FF.
Joel.

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to