File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes DIV height and appendChild Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "DIV height and appendChild" Watch "DIV height and appendChild" New topic
Author

DIV height and appendChild

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

When you add an element to a DIV using appendChild, the parent DIV's height does not adjust to fit the child element(s). Anyway I can do this somewhat dynamically since I won't ever be sure how many children I am adding to the parent?

Thanks.


GenRocket - A Test Data Generation Platform
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Originally posted by Gregg Bolinger:
When you add an element to a DIV using appendChild, the parent DIV's height does not adjust to fit the child element(s).


Sure it does, unless of course, you have over-ridden the height with a fixed size using CSS. Is that the case?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Originally posted by Bear Bibeault:


Sure it does, unless of course, you have over-ridden the height with a fixed size using CSS. Is that the case?


Yea, I knew that. And I don't know what happened between then and now, but it's working. Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Sometimes the act of posting scares bugs into fleeing into oblivion!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DIV height and appendChild
 
Similar Threads
Dynamically add inputs to a form
jQuery getting parent().parent()
Changing the text inside the first TextBox , the last div gets updated
Absolute div dynamically appended to body element
dynamically adding textboxes