PDA

View Full Version : How can i center my page even with layers ?


Chapo
06-28-2008, 03:23 AM
I want to center my page to it will always be in the center of my browser. But i have a couple of layers and i was told i can't insert layers inside tables. How can i fix this problem so i can center my page ?

www.fotorazi.com

2bz2p
06-28-2008, 05:13 AM
As long as the layout is CSS you can try this tut, it will show you how to create a wrapper around all your layers so it will center the whole layout.

http://www.dreamweaverclub.com/css-center-content.php

Hope that works
2b

cathy36
06-29-2008, 01:55 PM
Having m page centred no matter what size the screen resolution has been causing me a litlle bit of trouble. I am very new to dreamweaver so to anyone that is familiar with it, will probably think i'm very stupid but could you give me step step by step guide on how to centre my pages- where do i type in the code etc...??the help would be much appreciated

Ricky55
06-29-2008, 02:40 PM
This will center a Div,

Enter this code in between your <body> tags


<div id="container">Some Text</div>


And enter this code in the Head of your doc, the CSS you can enter this under the <title> tag.


<style type="text/css">
#container {
width: 300px;
height: 300px;
margin: 50px auto 0 auto;
background: red;
color: white;
}
</style>

m1a2x3x7
06-30-2008, 02:09 PM
This will center a Div,

Enter this code in between your <body> tags


<div id="container">Some Text</div>
And enter this code in the Head of your doc, the CSS you can enter this under the <title> tag.


<style type="text/css">
#container {
width: 300px;
height: 300px;
margin: 50px auto 0 auto;
background: red;
color: white;
}
</style>


To help you understand what's making this center is the margins.

When you set the left and right margins to auto that will center your div tag.

Chapo
06-30-2008, 02:51 PM
Hey thanx guys... that really worked out great....!!!!

cathy36
06-30-2008, 05:53 PM
thanks for that! has worked out perfect!!