Hello,
I am trying to center a DIV, with "margin:auto"
. It works fine with Chrome and FF but the following code does not center the DIV with IE:
CSS
#container {
margin:auto;
width:950px;
height:50px;
background:#000;
}
HTML
<div id="container"></div>
What am I doing wrong?
Thanks,
Joel
Edit (full HTML/CSS code):
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css">
<style>
#container {
margin: 0 auto;
width:950px;
height:50px;
background:#000;
}
</style>
</head>
<body>
<div id="container"></div>
</body>
</html>