body { display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0; } .cross { position: relative; width: 100px; height: 100px; } .line { position: absolute; background-color: white; } .horizontal-line { width: 100%; height: 2px; top: 50%; transform: translateY(-50%); } .vertical-line { height: 100%; width: 2px; left: 50%; transform: translateX(-50%); }