有人能指出我正确的方向吗?我正在尝试使用Rails中的Zurb Foundation创建一个内联选择器几小时:分钟。
<div class="row">
<div class="small-3 columns"><%= f.label :preptime, class: "inline-right" %></div>
<div class="small-3 columns time_select"><%= f.time_select :preptime, {:default => {:hour => '0', :minute => '15'}} %></div>
</div>
我创建了一个自定义类,尝试根据此处的其他帖子修复它。
.time_select{
display: inline;
color: blue;
}
当我在表格中包含代码时,我得到了
Preptime 00
:
15
而不是我期望的内联选择器。
这是生成的html:
<div class="row"><div class="small-3 columns"><label class="inline-right" for="recipe_yield">Yield</label></div>
<div class="small-9 columns"><input type="text" value="4.0" name="recipe[yield]" id="recipe_yield" /></div></div>
<div class="row">
<div class="small-3 columns"><label class="inline-right" for="recipe_preptime">Preptime</label></div>
<div class="small-3 columns time_select"><input type="hidden" id="recipe_preptime_1i" name="recipe[preptime(1i)]" value="2000" />
<input type="hidden" id="recipe_preptime_2i" name="recipe[preptime(2i)]" value="1" />
<input type="hidden" id="recipe_preptime_3i" name="recipe[preptime(3i)]" value="1" />
<select id="recipe_preptime_4i" name="recipe[preptime(4i)]">
<option value="00" selected="selected">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
... (options removed)
<option value="23">23</option>
</select>
: <select id="recipe_preptime_5i" name="recipe[preptime(5i)]">
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
... (options removed)
<option value="59">59</option>
</select>
</div>
</div>