How could I create a bordered red box around checkboxes that weren't selected but were required? I have it written this way at the moment.
<div class="fb-checkbox-group form-group field-checkbox-group-1500575975893">
<label for="checkbox-group-1500575975893" class="fb-checkbox-group-label">Checkbox Group</label>
<div class="checkbox-group">
<div class="checkbox"><label for="checkbox-group-1500575975893-0"><input name="checkbox-group-1500575975893[]" value="option-1" type="checkbox">Option 1</label></div>
<div class="checkbox"><label for="checkbox-group-1500575975893-1"><input name="checkbox-group-1500575975893[]" value="option-2" type="checkbox">option2</label></div>
<div class="checkbox"><label for="checkbox-group-1500575975893-2"><input name="checkbox-group-1500575975893[]" value="option-3" type="checkbox">option-3</label></div>
</div>
</div>
This is part of my stylesheet.
.invalid checkbox-group:required:invalid {
border: 3px solid #900;
}
My code does not produce anything. I cannot add any extra classes or IDs when I adjust the CSS, I can only use the classes or IDs I have. The .invalid comes from a typescript file. The type script file is suppose to show all the invalid elements after the user presses submit.
Was I close or am I wayyy off. Any advice for on how to change the css so I could get the bordered box to show up correctly?
Here are some of my sources: Delay HTML5 :invalid pseudo-class until the first event , Applying border to a checkbox in Chrome ,