Is this an issue in regards to block and inline elements?
It can be frustrating having to use
margin:auto wont work when you have not set a width or when you have a float. To center a block element you will have to give it a width then only you can use
margin: 0 auto. This is for block elements. For inline elements you will have to use