horizontally center inline-block element .center { display: inline-block; position: relative; left: 50%; transform: translateX(-50%); }