[Javascript] height problem, part deux
Peter-Paul Koch
gassinaumasis at hotmail.com
Mon Apr 30 15:22:48 CDT 2001
> > As far as I know NN4 has huge problems with images having a
> > height of 100% (I tried in tables and they were supposed to be as high
>as the TD).
>
>yeah, and it looks like NS6 has inherited this problem.
How lovely. Didn't know that.
>we managed to get NS4 dropped from the requirements for this project (woo
>woo! progress!), so 75% of the madness has dropped away. still, this
>height bug remains.
Well, that helps. But I still think this particular problem can be solved in
NN4.
>that's similar to what i just tried, and it seems to work. specifically, i
>have an abs-DIV with a variable height (this is all going into a template,
>so the contents of the DIV is dependent on the content for the specific
>page), and i need a table behind it to "stretch" so that a TD "fits" the
>DIV in terms of height. so i stuck a rel-DIV at the bottom of the abs-DIV
>(inside it, after the included content), then stuck a blank placer image
>inside that rel-DIV. calling the image's .offsetTop value gives me the
>bottom of the abs-DIV (relative to the abs-DIV itself), which i can then
>use to get the *height* of the abs-DIV.
>
>whew.
>
>in rereading this, i'm wondering if i need the rel-DIV at all...
No, you don't. Read out the .offsetHeight of the abs DIV (.clip.bottom in
NN4) and you're ready.
>FWIW, then i'm applying that value to an image in the TD that's supposed to
>"stretch" around the DIV. this forces the TD to grow to the height of the
>DIV (which is necessary, because there's more content below that needs to
>flow around whatever's inside the abs-DIV).
>
>if any of that made sense, i'll be amazed... 8)
Yes, it makes sense. I'd need to see the page to understand the details, but
I see what you're doing.
I assume you've discarded the idea of using a table throughout and ditch the
DIV altogether. I don't see a better solution than yours straight away.
ppk
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
More information about the Javascript
mailing list