You can try using text-align: center style on the div. I prefer using classes and use classes in CSS to add styles to elements. So I will do something like this, adding a class to div something like: "logo" and set following CSS:
.logo { background-color:#222222; height:50px; margin:auto; text-align: center; }
or for your case:
#header { background-color:#222222; height:50px; margin: auto text-align: center; }