Hi,

I need to calculate the line-height of an element. Unfortunately I cannot 
predict in which unit it will be set*** but I need to find out its px-value. 
If it is set in em or percent I can calculate it from the font-size, but 
that again could also be set in em or percent too.

So I'm wondering what's the right way to deal with this; Do I need to 
recursively traverse the DOM tree upwards until I find a 
line-height/font-size I can work with? What if none is set? I read the 
default font-size for IE/FF/Safari is 16px, but I'm actually not sure if 
that's true.

Or is there another way I can't think of?

Thanks,
Lukas


* if there's no other way I could base the calculation on px-, em- (and 
maybe percent)-values, but if I can avoid this that would be a bonus

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to