...

View Full Version : Centering Layers?



imroue
11-28-2002, 08:13 AM
Does anyone know what the setting is to center a layer?

For example:

<div id="Layer7" style="position:absolute; width:780px; height:16px; z-index:1; left: 0px; top: 632px; background-color: #FF9900; layer-background-color: #FF9900; border: 1px none #000000;">

Where/what would i put in the Position or anything to make this layer center on the page?

:confused: :confused:

meerkat
11-28-2002, 11:42 AM
imroue

I'm assuming you want this layer to appear in the centre of the browser window …

If so you could try this

body {
margin: 20px 0px; padding: 0px; text-align: center;
}

And then put in your 'div' layer

Don't know how cross-browser compatible this is though…

meerkat

MCookie
11-28-2002, 03:21 PM
This thread is about centering a table with CSS, but there's not much difference with centering a div:
http://www.codingforums.com/showthread.php?threadid=10211



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum