Here’s what I’m aiming for, working 100% correctly in Firefox 7.

When I open it in IE 8, it displays like this:

Here’s the basic layout:
<div id="header-home">
<div id="header-content">
</div>
</div>
With all of the elements inside of the #header-content.
Here’s the relevant HTML and CSS hosted on JSFiddle. If you stretch the preview pane you’ll see the contents are centered correctly on Firefox.
http://jsfiddle.net/stapiagutierrez/agURs/
Why is IE not centering the div as it should?
IE falling back to quirks mode if you don’t have doctype in your html. And in quirks mode margin auto; didn’t works.
Adding doctype can solve it.
Right doctype and header for xhtml (so xml-readers can understand that it is xml and can parse it) is:
But if you place xml line before DOCTYPE line, IE will not accept it (as it thinks that doctype is always first line of document). So to make it work in IE you should write:
or just: