PDA

View Full Version : pushing down content using div



d4005
January 9th, 2007, 01:19 PM
Can someone tell me which property of a div I should be initially setting when declaring the HTML, and then later changing as I expand it, so that it pushes down the content below it. I have the following:

some inline html stuff (e.g. tables, images, other divs .. I don't know what really)
<div id="mydiv"></div>
some more inline html stuff (e.g. tables, images, other divs .. I don't know what really)

All I know about is mydiv. What appears before and after I don't know what it might be or how it might be declared. What I do know is that normally mydiv is empty, but on demand I want to expand it's height from 0px to NNpx and I want it to push down everything below it. Currently I'm doing it like this:

some inline html stuff (e.g. tables, images, other divs .. I don't know what really)
<div id="mydiv"></div>
<iframe id="myiframe" height=0 etc></iframe>
some more inline html stuff (e.g. tables, images, other divs .. I don't know what really)

When I want to push down/up, I change the height of the iframe. I'd prefer to drop the iframe and use the properties of the div instead. I'm sure there's some display block/inline/none kind of properties could be used but I can't get them working.

duncanhall
January 9th, 2007, 01:47 PM
Why not forget the iframe and just change the height of the Div?

d4005
January 9th, 2007, 02:09 PM
Why not forget the iframe and just change the height of the Div?I've tried to simplify my problem to make it a standalone simple issue and it hasn't worked. I need to redefine my exact issue and come back with it.