var height = someElementReference.offsetHeight;

and to set it: 

someElementReference.style.height = "100";

It is worth saying that offsetHeight and offsetWidth are non-standard 
compliance. They will give you the total rendering height and this will cause 
problems in IE since they use a different box model than FireFox. So you will 
have to do some height juggling in IE if you are using padding, margins, or 
borders. (read up on the box model problem if you are wondering about it...)

For setting the height, this is a CSS declaration and can use any valid CSS 
value. The default is pixels but you can use other such as em.

Andrew Paul Martinez

 -----Original Message-----
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]  On Behalf Of Joe Hudson
Sent:   Wednesday, April 26, 2006 9:44 AM
To:     [email protected]
Subject:        RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a 
div

If no one has an answer to this, would anybody be able to tell me how to do
the following:

- how to get the height of a block element
- how to set the height of a block element

I'm sure these are trivial but I just haven't found the correct methods to
do so.  Thanks very much.

Joe


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:rails-spinoffs-
> [EMAIL PROTECTED] On Behalf Of Joe Hudson
> Sent: Tuesday, April 25, 2006 10:59 AM
> To: [email protected]
> Subject: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div
> 
> I would like to resize a div to half the size that it was and would like
> to
> use the BlindUp transition.  I think that I need the scaleTo parameter
> from
> the docs: http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown
> But this doesn't exactly work.
> 
> new Effect.BlindUp(gridId, {scaleTo: 50});
> 
> What happens is that the div does the blind up transition until it is half
> the original size then it disappears.  Is there any way I can not make the
> div disappear?  Thanks for your help.
> 
> Joe
> 
> 
> 
> _______________________________________________
> Rails-spinoffs mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> 



_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to