Layers

J

Jim Buyens

Yes, but except for left-justifying, centering, and right-justifying, you
would have to have to write some JavaScript code that queried the current
window size, calculated the layer position, and put it in to effect.

Of course, that same piece of code would have to run again if the Web
visitor happened to resize the window when your page is on display. There are
events that can trigger this but you have to set them up.

I really can't be more specific without knowing exactly what you want to do.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
M

Murray

Here is a good demonstration -

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

And here is some code -

(inline styles used for clarity)

STYLESHEET -
body { text-align:center; } /* for IE5/IE5.5 */
#wrapper { text-align:left; }

BODY -
<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.
 
M

Murray

Not easily if you want it positioned anywhere other than the center.

What are you trying to accomplish?
 
K

kevwash

I would like to have everything automatically centered on the screen.
I would like to have on the left menu options, when the mouse goes over a
particular option a layer would appear, but unfortunately the layers are
always in an absolute position and does not adjust when screen size changes
 
Top