Probably very easy: How do I center layers?

Soldato
Joined
18 Oct 2002
Posts
8,416
Location
South Central L.A.
Here is the page in question..... http://www.gurdas.co.uk/sikhsoc

The page is made up of 3 layers, one called Holder, another called Menu, another called Content.

Menu and Content layers are nested within Holder, so wherever Holder moves, they move. Now the only thing I need is that the Holder layer is vertically and horizontally centre of the page. This is so that whoever is viewing it, regardless of browser window size, the main stage is always in the centre.

I've been trying to figure out how but i'm failing terribly, any ideas? Source code is available when you view the link at the top.

Thanks
 
Take your styling out of the HTML, and stick it in a CSS file.

Then for horizontal alignment of the holder div, you would use this CSS:

#holder {
margin: 0 auto;
}

Not sure about vertical alignment, as im sure I've read it's harder to accomplish than simply auto margin.
 
Back
Top Bottom