Centered in opera but not IE. Why?

windows

Guest
Hello. Can anyone please help me with a problem.

My website: <!-- m --><a class="postlink" href="http://www.byggmesteren.net">http://www.byggmesteren.net</a><!-- m -->

It is centered in Opera but not IE.

Here's my css-file:

body {
font-family:verdana, sans-serif;
font-size:12px;
color: #333333;
background: #FFFFFF;
margin: 60px;
border:0;
}

#main {
border: 1px solid #000000;
background: #FFFFFF;
color: #333333;
height:450px;
width: 750px;
margin: 10px auto;

}
#header {
background: #00FFFF;
color: #333333;
margin-top: 0px;
left: 0px;
top: 0px;
position: relative;
height: 50px;
width: 750px;



}
#topbar {
background: #000000;
color: #333333;
left: 0px;
top: 0px;
position: relative;
height: 20px;
width: 750px;
margin: 0px;

}IE doesn't recognize the "auto" property if it thinks that you don't know what you are doing. You might try using a full DOCTYPE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

I've shown the DOCTYPE for HTML because you have some problems with your XHTML that indocate that you should stick to HTML until you have carefully read the XHTML 1.0 (<!-- m --><a class="postlink" href="http://www.w3.org/TR/xhtml1/">http://www.w3.org/TR/xhtml1/</a><!-- m -->) specification. If nothing else, you need to spend some time with Appendix C (<!-- m --><a class="postlink" href="http://www.w3.org/TR/xhtml1/#guidelines">http://www.w3.org/TR/xhtml1/#guidelines</a><!-- m -->).

Also, you might find that you need to split up the way you've defined the margin:

{margin:auto; margin-top:10px; margin-bottom:10px}Thanks.. I'll give it a try

I changed doctype and it worked... Thanks alot
 
Back
Top