Ahhh brilliant!

Firstly thanks to Benjamin for a speedy response. I never knew about
the dimensions plug in. Very useful!

I wrote my own little bit of code, but admittedly it doesn't take into
account the IE6 problem. Your version, Klaus, is excellent.

Thank you everyone! I knew it would be something simple!

Zarino



On Jul 8, 5:23 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> zarino wrote:
> > Hi!
>
> > I'd like to set all elements with the class ".inner" to have a minimum
> > height equal to the height of the browser's viewport. So, if the
> > window height is 550px, each of the '.inner' divs will have a minimum
> > height of 550px. I suspect it's bound to be super-easy to do with
> > jQuery, but newbie that I am, I can't figure it out. :-S
>
> > How would I go about doing this?
>
> > Many thanks,
> > Zarino
>
> Benjamin already mentioned the dimensions plugin. With it included, try:
>
> $(function() {
>      $('div.inner').css(($.browser.msie && $.browser.version < 7 ? '' :
> 'min-') + 'height', $(window).height() + 'px');
>
> });
>
> If you need to adjust on window resize try this:
>
> $(function() {
>      $(window).bind('resize', function() {
>          $('div.inner').css(($.browser.msie && $.browser.version < 7 ?
> '' : 'min-') + 'height', $(window).height() + 'px');
>      }).trigger('resize');
>
> });
>
> --Klaus

Reply via email to