First step: left: 50% place the left margin of the contained element at the center of the container (making the center of the contain object offsetting the center of the container by the amount of half of the contained object).
Second step: transform: translateX(-50%) align the center of the contain object by offsetting the value in previous step (translateX(-50%) means move center of object left by the amount half of its total width).
Hope this help :)