This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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: 15302
    
    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 - Experts at Building Test Data
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

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: 15302
    
    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: 63208
    
  69

Sometimes the act of posting scares bugs into fleeing into oblivion!
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: DIV height and appendChild
 
It's not a secret anymore!