// This is a case of a thick line. Without the transform property, the top and not the actual center of the line is in the middle of the div. .progress { position: absolute; top: 50%; left: 0; transform: translateY(-50%); z-index: -1; transition: .4s ease; }