CSS: How do I set the line length of a pseudo element?

With pseudo-elements :before and :after it is a bit more difficult to assign a corresponding length to a line or border. The following is a possible variant.

.linie-unten:after {
    background-color: #fff; 
    bottom: 0;
    content: '';
    display: block;
    height: 6px;
    left: 50%;
    position: absolute;
    transform: translate(-50%,0);
    width: 575px;
}
Without cookies
This website does not use cookies or tracking. More information can be found in the privacy policy.