hi i want to align the radio button to left but i cant how can i do that
<label id="recommend">
Would you recommend freeCodeCamp to a friend?
</lable>
<input name="attribute" type="radio" value="definitely"/>definitely
<input name="attribute" type="radio" value="Maybe"/>
Maybe
<input name="attribute" type="radio" value="notsure"/>not sure
Try adding <br>
's (line breaks)
The ultimate goal is do handle spacing with CSS but without seeing your full code it’s hard to make suggestions in that area.
Also be careful with spelling: </lable>
Hi @aysanahmadi7,
I agree with @ThatTyGuy:
be careful with spelling: </lable>
To align radio buttons to the left wrap each radio
button with a label
and the input
s with their label
with a div
, like this:
<div class="radios-container">
<label><input name="attribute" type="radio" value="definitely"/>definitely</label>
<label><input name="attribute" type="radio" value="Maybe"/>Maybe</label>
<label><input name="attribute" type="radio" value="notsure"/>not sure</label>
</div>
Apply to the div element some CSS:
.radios-container {
display: flex;
flex-direction: column;
}
Then apply some style to improve the visual design.
system
Closed
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.