Question: margin auto do not work?
Answer: You need to define the width of the element you are centering, not the parent element. An inline-block covers the whole line (from left to right), so a margin left and/or right won't work here. What you need is a block, a block has borders on the left and the right so can be influenced by margins.