Dynamically Changing Height Of Div Element Based On Content
I'm working on a Facebook-like toolbar for my website. There's a part of the toolbar where a user can click to see which favorite members of theirs are online. I'm trying to figure
Solution 1:
Maybe you could remove the height property (make sure it's not set in the CSS) and let the DIV expand in height by itself.
Solution 2:
Make it a float element and don't use a clearing element after it.
Solution 3:
You should take out the CSS height:25px property in the toolbar, the contents will expand the container. Also, ID selector tags are unique and you can specify directly to them without having to reference the ancestor:
INCORRECT:
#toolbar#popUpAction { /*some css */ }
#toolbar#popUpActiona { /*some css */ }
CORRECT:
#popUpAction { /*some css */ }
#popUpActiona { /*some css */ }
Post a Comment for "Dynamically Changing Height Of Div Element Based On Content"