<div class="row">
<div style="text-align:left;">
<input type="radio">
<label for="Employee">Employee</label>
</div>
<div style="text-align:left;">
<input type="radio">
<label for="Employer">Employer</label>
</div>
</div>
我只想将雇主标签和按钮稍微向右移一点,不是很多。
我该如何移动?
在这种情况下(看起来像只有2个div的硬编码),您可以使用CSS中的:last-child选择器。
这里是CSS-
.row {
div:last-child {
padding-left: 20px; //or any other of choice
}
如果要用于可变输入等,请更新您的问题,OP!
使用display:-webkit-box;希望能解决您的问题。
.row{
display:-webkit-box;
}
<div class="row">
<div style="text-align:left;">
<input type="radio">
<label for="Employee">Employee</label>
</div>
<div style="text-align:left;">
<input type="radio">
<label for="Employer">Employer</label>
</div>
</div>