Center Content CSS
Nomad
A Small Piece of Hell Icrontian
So I have looked at several ways to do this, and absolutely have not been able to get it to work. Something is wrong with my CSS.
My website is here, and in IE I cannot get the main div to center. Here is the top of my CSS:
[HTML]<style type="text/css">
body,
html {
margin:0;
padding:0;
color:#000;
text-align: center;
background:#fff;
}
#wrap {
margin-left:0 auto;
margin-right:0 auto;
width:760px;
text-align: left;
background:#fff;
}[/HTML]
Any ideas would be helpful
My website is here, and in IE I cannot get the main div to center. Here is the top of my CSS:
[HTML]<style type="text/css">
body,
html {
margin:0;
padding:0;
color:#000;
text-align: center;
background:#fff;
}
#wrap {
margin-left:0 auto;
margin-right:0 auto;
width:760px;
text-align: left;
background:#fff;
}[/HTML]
Any ideas would be helpful
0
Comments
take out margin-left and margin-right from #wrap. Replace it with "margin:0 auto"
margin-left and margin-right don't take 2 arguments (they are strictly the margin to the left and the margin to the right). Setting margin: 0 auto sets a 0px margin on top and bottom, auto margin on left and right.
http://www.w3schools.com/css/css_margin.asp
also: http://flumpcakes.co.uk/css/center-div-ie
No.
No, we added an HTML page with new CSS and the issue went away, so I get to play the tag conflict game.