View Full Version : positioning


xsweetxlanax
01-14-2006, 11:16 PM
I'm trying to make this update box thing right? And I have it coded perfectly and stuff using div layers.. but then when I paste it in a different spot on the page the content part of the update box doesn't move, only the image does.

This is how it's supposed to look like (http://so-juicy.net/visitor/blog.php)

And this is how it looks like when I add it somewhere else to a page. (http://so-juicy.net/visitor/blog2.php)

I absolute positioned the content part INSIDE another div layer which I did not abo````e position. That sounds confusing doesn't it? Well you can look at the code if you want.

Does anyone know how to fix it so that the content stays put inside the layout no matter where I move it to?

lilacdragon
01-15-2006, 04:22 AM
Well... are you trying to make something that looks like this?
(see the how the text box overlaps part of the image where it says faerie pb fund)
http://neopets.com/guilds/guild.phtml?id=314074

hopefully you have a neopets account so you can see it =) if not I can try to give you a code

lilacdragon
01-15-2006, 04:29 AM
<IMG SRC="www.image.com" style="position: absolute; left: 0; top: 0" width="400" height="300">
<div style="position: absolute; top: 0; left: 0; width: 400; height: 300;">
text here
</div>

Basically, what you're doing is over lapping the image with the text... you can always change the positioning of the two as well, if you don't want it to completely cover the image you'd slightly decrease the width and height and move it slightly down and to the left.

Hope this helps!

xsweetxlanax
01-15-2006, 12:34 PM
Thank you for attempting to help me :) But I figured it out myself. I just used relative positioning and placed the ENTIRE thing in a table so that the relative positioning wouldnt get screwed up when I centered it. Thanks again!