Preserved Topic: hegiht of a div |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: oslo, Norway |
posted 11-06-2001 02:49
If i have text inside a div tag, is it then posible to find out the height of the layer? |
Maniac (V) Mad Scientist From: New California |
posted 11-06-2001 06:46
Say you have a div called "myDiv" then these are supposed to work. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 11-06-2001 07:13 |
Nervous Wreck (II) Inmate From: Atlanta, GA, USA |
posted 11-06-2001 16:13
actually, <obj>.style.height will always give you what you put in for it's style attribute -- which you already probably know. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 11-07-2001 01:44
As stated in my example from above offsetHeight works in Mozilla, too, so there's no need for a little bit more complicated getComputedStyle() function in this case when we only need layer's height... |
Nervous Wreck (II) Inmate From: Atlanta, GA, USA |
posted 11-07-2001 09:04
damn - i scanned over that line of code. sorry max. saw that you were using .style.height (which is kinda strange since, you normally either want the stated height or the actual height, not whichever one is available) but whatever. |