PDA

View Full Version : how to make content div "expand" depending on nested div content??


fredlondon30
03-11-2009, 01:43 PM
*newbie - be nice and patient*

I have created a simple template with a container in which I have a header-div, content-div, and footer-div.

If I'm writing text straight into the content div, it expands vertically to contain all the text I'm putting in - adapting itself to the amount of text/images that's in there.

But what if I put in a new div (be it normal div, or "draw-AP-div") inside the content div? How can I associate them so that the content div expands depending on what other stuff I put in there?

For example, I tried to put in a repeating region / repeating table inside the content div. After much trouble I more or less managed to make it editable etc, but once I 'added' a new repeating region or two - they expanded vertically out of the content div! What I had wanted was for the content div to expand so that how many times I repeated inside, it would always surround the new repeated region/table - and the footer should always stay at the bottom?

Please... help! :confused::confused:

THANK YOU!

Corrosive
03-11-2009, 05:46 PM
*newbie - be nice and patient*

I have created a simple template with a container in which I have a header-div, content-div, and footer-div.

If I'm writing text straight into the content div, it expands vertically to contain all the text I'm putting in - adapting itself to the amount of text/images that's in there.

But what if I put in a new div (be it normal div, or "draw-AP-div") inside the content div? How can I associate them so that the content div expands depending on what other stuff I put in there?

For example, I tried to put in a repeating region / repeating table inside the content div. After much trouble I more or less managed to make it editable etc, but once I 'added' a new repeating region or two - they expanded vertically out of the content div! What I had wanted was for the content div to expand so that how many times I repeated inside, it would always surround the new repeated region/table - and the footer should always stay at the bottom?

Please... help! :confused::confused:

THANK YOU!

Stop using Ap Divs, absolute positioned divs, layers whatever you want to call them. Build your main site structure using relative positioning and it will all expand correctly. AP Divs should be used sparingly and for a specific reason.

fredlondon30
03-11-2009, 07:51 PM
Point taken, so do you know where there's a good tutorial explaining how to actually position them??? I'm utterly confused with absolute positioning, relative positioning, nesting etc. Ya, I'd better buy a book!