View Full Version : Centering layout using layers

02-07-2006, 07:54 PM
Hi there,

How do i center my layout, ive tried all the methods on this site however it doesnt work, i think this may be because my layers postions are absoulte, if this is the case how do i change this while keeping the layout of the layers exactly as i have them now.

Any help will be greatly appreciated



02-07-2006, 08:17 PM
Hi Jamie, welcome to the forums! :)

'Center' is a relative term, it means when browser size changes, the position of the content changes as well because it needs to be as far from the right side as from the left side.

This is incompatible on a logical level with absolute positioning. Absolute positioning will place content in a certain spot measured from the top left corder of the viewport no matter size of browser.

Centering content and absolute positioning are mutual exclusive, they can't exist together.

You have to choose, do you want your layers to be exactly where you placed them (absolute positioning) or do you want the position to change (centered)

02-08-2006, 04:36 PM
Thanks for your reply domedia,

How would i postion the layers without using absolute positioning, dreamweaver seems to just use absolute as default when i postion the layers. Do i just take out the absolute piece, or do i need to replace it with something else.

Thanks Again


Creative Insanity
02-08-2006, 05:23 PM
If I am not mistaking.. (dom will correct me if I am) replace it with relative.

02-08-2006, 05:23 PM
>How would i postion the layers without using absolute positioning
You can't they are the same thing

Dragging layers and positioning them *is* absolute positioning.
There is a tutorial on the homepage for centering content. :)