复选框和标签不是内联CSS Magento表单

时间:2016-04-12 18:00:30

标签: css magento

This is what is showing what ever css style I put

I really want to have this please help

<li><div class="wide checkbox-inline">
<label class="required" for="options[3]">Delivery Day  <em>*</em> </label>
<div class="input-box">
<ul class="options-list"><li><input type="checkbox" name="options[3][]" id="options_3_text_Sunday" class="checkbox" title="Sunday" value="Sunday"><label for="options_3_text_Sunday"> Sunday</label></li><li><input type="checkbox" name="options[3][]" id="options_3_text_Monday" class="checkbox" title="Monday" value="Monday"><label for="options_3_text_Monday"> Monday</label></li><li><input type="checkbox" name="options[3][]" id="options_3_text_Tuesday" class="checkbox" title="Tuesday" value="Tuesday"><label for="options_3_text_Tuesday"> Tuesday</label></li><li><input type="checkbox" name="options[3][]" id="options_3_text_Wednesday" class="checkbox" title="Wednesday" value="Wednesday"><label for="options_3_text_Wednesday"> Wednesday</label></li><li><input type="checkbox" name="options[3][]" id="options_3_text_Thursday" class="checkbox" title="Thursday" value="Thursday"><label for="options_3_text_Thursday"> Thursday</label></li><li><input type="checkbox" name="options[3][]" id="options_3_text_Friday" class="checkbox" title="Friday" value="Friday"><label for="options_3_text_Friday"> Friday</label></li><li><input type="checkbox" name="options[3][]" id="options_3_text_Saturday" class="checkbox validate-one-required-by-name" title="Saturday" value="Saturday"><label for="options_3_text_Saturday"> Saturday</label></li></ul>        </div>
 </div></li>

.checkboxes label {
    display: block;
    float: left;
    padding-right: 10px;
    white-space: nowrap;
}
.checkboxes input {
    vertical-align: middle;
}
.checkboxes label span {
    vertical-align: middle;
}

1 个答案:

答案 0 :(得分:0)

添加完代码后,我仔细看了一下。似乎问题是由使用UL(无序列表)引起的。该列表汇总了所有列表项(LI),它通常从每个项目的新规则开始。 通常这是你想要的添加列表,但在这种情况下,你不想总结列表中的复选框。

要快速解决问题,您可以使用此样式:

.options-list li{
  display: inline;
}

更好的方法是省略&lt; li&gt; - 和&lt;在这种情况下,ul> -tags。 检查这个工作示例: https://jsfiddle.net/crix/o1du23b3/

希望这有帮助!