Click to See Complete Forum and Search --> : div not centering my page on IE


ituano
04-21-2007, 09:13 AM
I have used the div tag with left and right margins set to auto to center my page. However on the design view on dreamweaver as well as while previewing it in IE the page is aligned to the left. This is not the case when previewed in other browsers like Opera and Mozilla. In the aforementioned browsers he page is centrally positioned.
What should I do to ensure that the page is centrally positioned in both the design view as well as when previewed over the IE.
I have below the Css
#container
{
background: #ffcc00;
width: 760px;
text-align: left;
margin-right: auto;
margin-left: auto;
}

Thanks
ituano

aj_nsc
04-21-2007, 09:23 AM
not declaring a proper doctype will have this effect. your css is fine, but you need to declare a doctype.

ituano
04-21-2007, 09:41 AM
What do you mean by a doctype? Please you expantiate?

aj_nsc
04-21-2007, 10:01 AM
http://www.w3schools.com/tags/tag_doctype.asp

drhowarddrfine
04-21-2007, 10:17 AM
Use HTML strict. You have no need for the others.