View Full Version : Technical Q:

01-29-2010, 01:12 AM
Does anyone know if it's possible to have a div that would move automatically. I am trying to ad a comments box on a page and I need the div to expand automatically as the reader leaves comments. I really don't want to include the "auto" feature because it would display that ugly scroll bar but, I also do not want the div to overlap the footer.... Thanks

01-29-2010, 01:19 AM
It's going to depend on your layout.

If your div is absolutely positioned or floated it's going to expand over your footer. For most uses, you really shouldn't be using absolutely positioned divs.

If the div is floated, you can use the CSS clear (right, left or both) property for the footer (or another object that appears after the floated div) to keep the footer below the expanded div.

01-29-2010, 01:19 AM
dont assign a height value,
if the div is cleared (or the footer) the divs wont overlap

01-29-2010, 06:24 AM
Yes, agree with the guys. I thought your were a bit further advanced than this mate. Relative positioning, no height, clear the footer. That is basically the way I will build most sites.

If I have content of different lengths on different pages (which is the norm) then I do this so that I'm not defining a height for my content on every page.

01-29-2010, 12:55 PM
That did it. Thanks