Forum Moderators: open

Message Too Old, No Replies

Problem with layers

Resizing my browser window messes up the layout.

         

KrYlLX

11:59 am on Sep 3, 2003 (gmt 0)

10+ Year Member



(sorry for the language :) )
I have a big problem no one else seems to have, so I think perhaps I'm the problem :))

When I put a layer with text inside, over a picture that I have inside a table, it looks good until I resize the window.
The content of the site then moves because it's centered, but the layer won't follow and ending up somewhere it should not be.

Do U follow? (Having some difficulties explaining in English :))

Is there a way to connect the layer to a table/picture so that the layer will follow the layout when the window is resized?

Thanks in advance...
P.S. I'm reloading the page with onResize when it's resized)

BlobFisk

2:18 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, KrYlLX!

Do you see this in all browsers or just one in particular? Can you replicate the problem on another computer?

Also, could you post your Resize code and maybe a snippet of the CSS for the layer that is acting up - just the positioning stuff, no need for the typographical styles!

KrYlLX

5:26 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



ThankU for the welcome.

Iīm testing in IE6 and NS6

Hereīs the code:

onResize="window.location.reload()

<div style="position:absolute; left:609px; top:238px; width:120px; z-index:5; visibility: visible"><span class="text">

What i donīt like is that I think the browsers doing the right thing.
When I have the window in fullsize the content(site) is in the middle of the window, centered with black fields around it. When i drag and makes the window smaller The black fields is getting smaller and smaller and the site stays in the middle.
So from start the site is perhaps 200 pixels from left and 250 pixel from top. These changes offcourse when you then makes the window smaller. But it will not change for the layer. It will stay left 609px and top 238px and then it does not follow the content on the site.

BUT i have seen this beeing made on other sites, but I will soon give up :(

BlobFisk

5:29 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're right - the browser is doing exactly the right thing!

Your CSS specifies and absolute position - 609px from the left and 238px from the top.

To achieve the centering you want, have a look here [bluerobot.com] and here [bluerobot.com].

HTH

KrYlLX

9:51 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



Thanku for your help but I didnīt get it to work as I wanted.
Did it with nested tables instead, much easier :) ....

Nick_W

9:54 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>much easier

But, don't ya feel kinda dirty now? ;)

Nick

KrYlLX

6:41 am on Sep 4, 2003 (gmt 0)

10+ Year Member



a little yes... :)

...had to, has to be finished sometime..

hmmm I know there is a NS problem with nested tables when you put the picture as background inside the TD tag. And then put the text over the pictures.
NS will duplicate the picture in every cell you do in the table. I was ready for this and did transparent gifs to get around it.... But I didnīt need them, it worked without the gifs. NS did not duplicate as it did in another project i did. Don't get it, but as long as itīs positive for me i'm happy... Think I have to dubbelcheck in older browsers.