I have two DIV containers. I would like to be able to dynamically position one DIV inside of the other where the container DIV expands to fit the first. Problem is when I make the container DIV position:relative and the dynamic DIV position:absolute the dynamic DIV will position itself inside of the container DIV but the container DIV will not expand height wise to fit the DIV inside. So I get something like this.
When I want this
Is there any way without using a static height to get a container DIV to expand to the height of it's dynamic contents?
Thanks
-Craig
Code:
+--------------------------+
| +---------+ |
+-| |--------------+
| |
+---------+
When I want this
Code:
+--------------------------+
| +---------+ |
| | | |
| | | |
| +---------+ |
+--------------------------+
Is there any way without using a static height to get a container DIV to expand to the height of it's dynamic contents?
Thanks
-Craig