Sounds like one of two things:

1) You are floating the image - this would make the <div> have a
height of 0. You need to clear the float if this is the case.
2) You have cache disabled - and the image hasn' t loaded yet (so has
a height of 0). Try deferring your measurement to onLoad() - does that
fix it?

Cheers
Darren

On Jan 5, 12:18 am, Ryan Florence <[email protected]> wrote:
> Can you extract a test case onhttp://mootools.net/shell?
>
> If those methods aren't working you've got other issues.
>
> On Jan 4, 2010, at 5:15 PM, Simon Vart wrote:
>
>
>
> > Yes, I have tried getSize().y
>
> > Truly guess I have  tried everything...
>
> > On 5 jan, 01:02, cbolson <[email protected]> wrote:
> >>> I have tried to use element.getProperty('height') ; used
> >>> element.offsetHeight and also element.getScrollSize(); but I never
> >>> manage to get the actual height of the div.
>
> >> Probably a silly question but have you tried getSize()?
> >> ttp://www.docs.mootools.net/docs/core/Element/Element.Dimensions#Element
> >> :ge...
>
> >> Chris
>
> >> On 5 ene, 00:53, Simon Vart <[email protected]>
> >> wrote:
>
> >>> Hi all,
>
> >>> I'm trying to do a simple change.
>
> >>> I had set up a little image carousel, with back/fwd button to change
> >>> view. This is two divs, one is containing the images, the other is a
> >>> mask with a overflow: hidden; style.
>
> >>> I want to add a button to see all images in one clic.
>
> >>> Basically, what i'm doing on clic is :
>
> >>> - Change the width on the div containing all images (so the images,
> >>> instead of being in one single line, are disposed on the div).
>
> >>> - Then I want to get to new height of the div in order to calculate
> >>> the effect to apply on the mask layer and make a transition to this
> >>> height (slowly revealing the images).
>
> >>> But !
>
> >>> I have tried to use element.getProperty('height') ; used
> >>> element.offsetHeight and also element.getScrollSize(); but I never
> >>> manage to get the actual height of the div.
>
> >>> If I set the height of the div in the css : I get the same value  
> >>> that
> >>> i had set up. If I'm not setting any value anywhere, the value is
> >>> undefined, or 0. I had check the syntax : if I want to get the width
> >>> of the
>
> >>> Is there a way to know the height of this div ?
>
> >>> (I cannot put a value on it, because the function will be use on
> >>> different pages, with different content, so the height of the div
> >>> could considerably change)
>
> >>> Thank you, this may be a dumb question, but I've tried to find out
> >>> without success.

Reply via email to