Layers

  • Thread starter Thread starter Guest
  • Start date Start date
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)
|/---------------------------------------------------
*----------------------------------------------------
 
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.
 
Not easily if you want it positioned anywhere other than the center.

What are you trying to accomplish?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top