Attempting to align a radio button and its label using the display: flex;
property on the parent element.
However, if the label of the radio button spans multiple lines, the button seems to shrink in width despite being explicitly set.
Below is the snippet of my HTML/CSS code:
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.. (too long to finish here)
</label>
</div>