PDA

View Full Version : How do I relative position this script?



spinweb
01-20-2003, 04:50 PM
http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm

I just want the box to be centered in whatever environment it finds itself.

Changing the below to "position:relative" causes the window to come in at the bottom of the monitor....

id="dropin" style="position:absolute;visibility:hidden;left:350;top:100;width:450;height:325;background-color:#000000">

Any Ideas?

Thanks!

Rick

beetle
01-20-2003, 10:27 PM
No, leave it's position: absolute and make the position of the parent element, whatever it may be, relative.

Graeme Hackston
01-20-2003, 10:27 PM
It has to be positioned absolutely. You could probably set the position depending on its container but why not just use the CSS left and top attributes?