body > main > div:nth-child(4) > div > div > div > div > div > table > thead:before { content: ''; position: absolute; top: 0; left: 50%; /* <-- put left edge in the middle */ margin-left: -20%; /* <-- shift to the left by half of the width */ width: 40%; height: 1px; background: #000; }