Hi,
I have the following page:
www.martynbissett.co.uk/index_div.html
It is very basic that all elements will be structured using <div> tags
and CSS styles will define the layout. What I dont know how to do is
align the wrapper <div> (#maindiv) center. How is this done?
Cheers
Burnsy
logic_earth - 30 May 2005 08:44 GMT
body {
margin: 0;
text-align: center; /* IE5 workaround */
}
#maindiv {
background-color: #eee;
width: 750px;
margin: 0 auto;
text-align: left;
}
logic_earth - 30 May 2005 08:51 GMT
i forgot to post a reference.
http://www.google.com/search?q=css+centering
http://www.simplebits.com/notebook/2004/09/08/centering.html
Jim Moe - 30 May 2005 08:57 GMT
> It is very basic that all elements will be structured using <div> tags
> and CSS styles will define the layout. What I dont know how to do is
> align the wrapper <div> (#maindiv) center. How is this done?
margin-left: auto;
margin-right: auto;

Signature
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)