DIV height issues...
May 25, 2007 10:29 PM
Subscribe
Let's say I am using a JavaScript technique that requires a DIV to have a specified height, but the amount of text filling it, and thus the height it needs to be, will vary. Can I make it work?
I want to use
this nifty trick to make DIVs slide out of nowhere containing comments on items in a list. The only problem is, it only seems to work if you specify the height of the DIV. The height of the DIVs will vary based on how many comments there are, and how long each one is. Is there any way to dynamically acquire the height the DIV
would have if it were allowed to be as tall as necessary, and then set that? I'm using PHP, if that makes a difference...
posted by TunnelArmr to computers & internet (8 comments total)
3 users marked this as a favorite
I like quirksmode for these kinds of answers.
PHP is server side and has no business in this conversation.
Third if you like this kind of thing you may want to just check out the Scriptaculous Effect Library built on top of prototype. It does the same thing and more.
posted by bitdamaged at 10:42 PM on May 25, 2007