I have an HTML list of checkbox formulas. All flags are labeled.
I create this form using flexbox. Using flexbox makes one of the checkboxes smaller than all the others. It seems that the reason is that the label text for this flag is so long that it needs to be moved to the next line.
.filter-list li {
display: flex;
flex-direction: row;
align-items: center;
}
.filter-list input[type=checkbox] {
margin-right: 2rem;
height: 20px;
width: 20px;
}
<li>
<input class="filterCheckbx" id="filter1" type="checkbox" name="section" value="Angewandte Ingenierwissenschaften">
<label for="filter1">Hochschule</label>
</li>
<li>
<input class="filterCheckbx" id="filter2" type="checkbox" name="section" value="Angewandte Ingenierwissenschaften">
<label for="filter2">Angewandte Ingenierwissenschaften</label>
</li>
<li>
<input class="filterCheckbx" id="filter3" type="checkbox" name="section" value="Bauen & Gestalten">
<label for="filter3">Bauen & Gestalten</label>
</li>
<li>
<input class="filterCheckbx" id="filter4" type="checkbox" name="section" value="BWL">
<label for="filter4">BWL</label>
</li>
<li>
<input class="filterCheckbx" id="filter5" type="checkbox" name="section" value="Informatik">
<label for="filter5">Informatik</label>
</li>
<li>
<input class="filterCheckbx" id="filter6" type="checkbox" name="section" value="Logistik">
<label for="filter6">Logistik</label>
</li>
Run codeHide resultAnd of course, here's a Plunkr demo: http://plnkr.co/edit/aagWvhpvuH5sPXBXUbUH?p=preview
Here is an example with flexbox:


Anyone have any ideas how to solve this problem?
source
share