.fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; } .input + .cnt { border: 1px solid transparent; border-radius: 8px; cursor: pointer; margin-right: 5px; margin-bottom: 5px; } .input:focus + .cnt { border-color: #387cec; } .input:checked + .cnt { border-color: #387cec; }