View Full Version : Centering Layers?

11-28-2002, 07: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:

11-28-2002, 10:42 AM

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…


11-28-2002, 02:21 PM
This thread is about centering a table with CSS, but there's not much difference with centering a div:

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum