I am trying to align radio button and its label by making its parent element display: flex;
.
However, when a radio button's label
contains multiple lines, the radio button becomes narrower, even though its width
is explicitly defined.
Here is my html/css
label {
display: flex;
padding: 10px;
margin: 10px;
background-color: lightgrey;
cursor: pointer;
}
input[type="radio"] {
width: 12px;
margin-right: 1em;
}
<div class="flex-radios">
<label>
<input type="radio" /> Lorem ipsum.
</label>
<label>
<input type="radio" /> Lorem ipsum..Lorem ipsum..Lorem ipsum..Lorem ipsum..Lorem ipsum..Lorem ipsum..Lorem ipsum..Lorem ipsum.
</label>
</div>