.underline { background: linear-gradient(90deg, #000 0, #000 4px, transparent 4px, transparent 100%) bottom left / 6px 2px repeat-x; display: inline-block; padding-bottom: 3px; }