• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DIV height and appendChild

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes the act of posting scares bugs into fleeing into oblivion!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic