Is there a way to align my checkboxes next to each other in columns of 5, rather than being stacked vertically?
The current layout looks like this:
I would like the checkboxes to appear like this:
[x] label [x] label [x] label [x] label [x] label
[x] label [x] label [x] label [x] label [x] label
This is what my code shows:
<div class="row form-group">
<div class="col col-md-3">
<a data-toggle="collapse" href="#collapsKlassen">
<h5 class="mb-0">
Klassen <i class="fas fa-angle-down rotate-icon"></i>
</h5>
</a>
</div>
<div class="col-12 col-md-9 collapse" id="collapsKlassen" style="margin-right: 5px;">
<div class="form-check " >
<div >
@Html.EditorFor(x => x.CheckBoxKlassen)
</div>
</div>
</div>
</div>
I have attempted using formcheck inline among other methods, but nothing has provided the desired result. EDIT: Rendered code:
<input id="CheckBoxKlassen_0__ID" name="CheckBoxKlassen[0].ID" type="hidden" value="61" />
<input id="CheckBoxKlassen_0__Display" name="CheckBoxKlassen[0].Display" type="hidden" value="BIO 1Aa" />
<input data-val="true" data-val-required="The WasChecked field is required." id="CheckBoxKlassen_0__WasChecked" name="CheckBoxKlassen[0].WasChecked" type="hidden" value="False" />
<input data-val="true" data-val-required="The IsChecked field is required." id="CheckBoxKlassen_0__IsChecked" name="CheckBoxKlassen[0].IsChecked" type="checkbox" value="true" />
<label for="CheckBoxKlassen_0__IsChecked">BIO 1Aa</label>
<br /><input id="CheckBoxKlassen_1__ID" name="CheckBoxKlassen[1].ID" type="hidden" value="64" />
<input id="CheckBoxKlassen_1__Display" name="CheckBoxKlassen[1].Display" type="hidden" value="BIO 1Ab" />
<input data-val="true" data-val-required="The WasChecked field is required." id="CheckBoxKlassen_1__WasChecked" name="CheckBoxKlassen[1].WasChecked" type="hidden" value="False" />
<input data-val="true" data-val-required="The IsChecked field is required." id="CheckBoxKlassen_1__IsChecked" name="CheckBoxKlassen[1].IsChecked" type="checkbox" value="true" />
<label for="CheckBoxKlassen_1__IsChecked">BIO 1Ab</label>
...