仅CSS ***** This is what is goin on如何将标签与垂直对齐的单选按钮对齐。下拉菜单未与其标签对齐时,我遇到了同样的问题。
label{
display: inline-block;
width: 150px;
text-align: right;
}
input{
display: inline-block;
text-align: left;
width: 48%;
}
<label>*What is your level of expertise?</label>
</div>
<div class="Dropdown">
<select>
<option value="Junior">Junior</option>
<option value="Intermediate">Intermediate</option>
<option value="Expert">Expert</option>
</select>
</div>
<Div>
<label for="radio">What is your Occupation?</label>
</Div>
<div class="radiobuttons">
<input type="radio" name="Occupation" value="Developer"> Developer<br>
<input type="radio" name="Occupation" value="Programmer"> Programmer<br>
<input type="radio" name="Occupation" value="Administrator"> Administrator
</div>