relative position for layer?

message from flaucki on 21 Jul 2004
after trying to find my answer to this question on a couple of forums, search
engines, help sites, and half of barnes and nobels dreamweaver and HTML books,
I am posting my question here

I am trying to add a show/layer on mousover and hide/layer on mouseout
behaviour with dreamweaver. That works nice and easy!

However I have massive problems with the positioning of my layers. I need to
stack them on top of each other, which wasnt a problem but the absolut position
doesnt work for me, because my layer will be positioned somewhere else each
time somebody resize the browser, uses a different screen or resolution. (at
least thats the problem I had when testing on my computer)

Is there a way to create realtive position for layers? I tried to just change
the source code to position=relative but that didnt work, because I couldnt
stack these "relative" layers on top of each other... And also when I changed
the source to relative Dreamweaver didnt show me the layers in the layer panel
anymore.. (that wouldnt have been a problem, but like i said i need to stack
them, and that wasnt possible)

What solution is there for this problem???

Here is essentially what I want to do. on the www.brasslesachtal.com web-site
i want the name of each person to appear in the table below the thumbnails when
I mouse-over each thumbnail picture.

The show/hide behaviour works great like I said, but I need to solve the issue
with the layers. My guess is, if there is no solution for that I might try a
swap-image rollover thing and try it that way.

Thanks for any input! Hopefully I can figure it out soon, since this is the
last thing I want to add to the web-site

thanks,

Florian
 
Murray *TMM* replied to flaucki on 21 Jul 2004
Not if you do it right. CSS can fix you right up here.

Check this out -

For centering layers, here is a good demo -

http://www.roast-horse.com/tutorials/_tutorials/css_centered_content/index.html

and here is some example code -

(inline styles used for clarity)

<div id="wrapper" style="width:760px; top:0; margin:0 auto;
position:relative;">
<div id="layer1" style="width:200px; top: 25px; left:140px;
position:absolute;">blah</div>
<div id="layer2" style="width:180px; top: 136px; left:23px;
position:absolute;">blah</div>
</div>

Try that - an outer relatively positioned division with a width and auto
left and right margins. All interior AP divisions will be centered, yet
retain the
same relative positioning.
 
Jerry McEwen replied to Murray *TMM* on 22 Jul 2004
Wow, this is perfect, thanks!
http://www.dreamlettes.net/extensions/toggler/forms.htm
 

Archived message: relative position for layer? (Macromedia Dreamweaver Web Design)