Forum Moderators: not2easy

Message Too Old, No Replies

Center Layers

         

imbuez_couk

5:05 pm on Nov 14, 2003 (gmt 0)



Hello, im new to the group but have been reading messages on the forum for a while. This might sound a bit far fetched but is it possible to center a layer in the middle of the screen as you would a table...

Its been confuzing me for a while and havnt been able to come up with a solution.

What i hope to achieve is a layer in the center of the users screen, and then embed other layers inside using the top right register point of the center layer?(i hope that makes sence)

Any help would be appreciated.Thanks

Martin//..

[edited by: Nick_W at 5:25 pm (utc) on Nov. 14, 2003]
[edit reason] No sigs please / thanks! [/edit]

garann

5:24 pm on Nov 14, 2003 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld. :)

Just centering the layer is easy - define it's dimensions and set it's left and right margins to auto, like:


#mainLayer {
width: 600px;
height: 100%;
margin: 0px auto;
}

Nesting other layers in the centered layer shouldn't be a problem, as long as you're using relative positioning. If you're positioning the child layers absolutely, hopefully someone else can help you..