我有这个CSS:
.leftmarginbreathingroom {
margin-left: 8px;
}
...和这个 HTML:
<div class="row">
<div class="col-md-12">
<h4 class="h4 sectiontext leftmarginbreathingroom">Generate and Email Reports</h4>
</div>
</div>
@* "On a specific day of the month" radio button and Day of month selection element *@
<div class="row">
<div class="col-md-12">
<input type="radio" id="groupRptGenerationAndSendingByDayOfMonth" class="leftmarginbreathingroom" value="day">On a specific day of the month:
<select id="dayofmonthselect" class="leftmarginbreathingroom">
@foreach (String day in daysOfMonth)
{
<option id="selItem_@(day) value=" day">@day</option>
}
</select>
<label> of each month</label>
</div>
</div>
@* "Based on a pattern" radio button and select elements *@
<div class="row">
<div class="col-md-12">
<input type="radio" id="groupRptGenerationAndSendingBasedOnAPattern" class="leftmarginbreathingroom" value="pattern">Based on a pattern
<select id="ordinalselect" class="leftmarginbreathingroom">
@foreach (String ord in ordinalWeeksOfMonth)
{
<option id="selItem_@(ord) value=" ord">@ord</option>
}
</select>
<select id="dayofweekselect">
@foreach (String dow in daysOfWeek)
{
<option id="selItem_@(dow) value="dow">@dow</option>
}
</select>
<label> of each</label>
<select id="weekormonthselect">
@foreach (String pf in patternFrequency)
{
if (pf == "Month")
{
<option id="selItem_@(pf)" value="@pf" selected="selected">@pf</option>
}
else
{
<option id="selItem_@(pf) value="pf">@pf</option>
}
}
</select>
</div>
</div>
...然而,虽然左边距应用于 h4 元素和 select 元素,但它不应用于输入单选元素:
为什么不?我怎样才能让单选按钮也与其他元素一起以像素步长向东?