View Full Version : Div Layers


Stickievix
05-10-2004, 03:58 PM
I'm having some div layer problems. Basically, the div layer moves when my page is smaller (eg, when the 'favourites' or the 'search' side-bar is out). But because I'm trying to align it up the the image which is on the right, I need it not to do this.

So is there any way in which I can position div layers so that they stay put?

Thanks.

lilchici13
05-10-2004, 08:03 PM
i have the same problem, umm. i did it once before...it was something like you put the code for the div layers into a table cell. however i can't remember how i did it so for now i would just suggest using an iframe. if i suddenly remember how i did it ill post!

Rosey
05-10-2004, 08:04 PM
absolute position them.

<div style="position:absolute; top: XXpx; left: XXpx">

and just change the XX to a number.

Stickievix
05-10-2004, 08:59 PM
I'm afraid the positioning is already absolute. Unless there is anything else I can do I shall put them into a table.
Thanks for the help guys :)

salomeyasobko
05-10-2004, 09:02 PM
make sure everything that is positioned on the page is positioned from the same two sides.. like make sure all of them are top and left or bottom and right or whatever.. because if something is positioned from the top and left and something else is positioned from the bottom and left, it'll cause them to move around when the page is resized.

Stickievix
05-10-2004, 09:10 PM
Yep, I think it's all there from the top and left. If you fancy having a look it's just here: http://www.geocities.com/stickievix/return.html (though it's now in tables!)

salomeyasobko
05-10-2004, 09:21 PM
even with tables, the positioning is off :lol: can you show us the coding for your site? [just the necessary stuff, not all of it]

jazzberry
05-10-2004, 09:22 PM
ok, you've got your div layers positioned and they're staying, it's your image that is moving, because it's in a table. so you need to absolute position your image

<img src"whatever.gif" style="position:absolute; top: #; left: #;">

because it looks like you were trying to get your image on the right side of the page. However the picture will move if you position in to the right Hopefully that works out better :)