Css 简单表单无法内联对齐2个集合选择
如何以简单的形式对齐2个集合下拉列表并使其内联[drop 1][drop 2] 例如:Css 简单表单无法内联对齐2个集合选择,css,ruby-on-rails,inline,simple-form,Css,Ruby On Rails,Inline,Simple Form,如何以简单的形式对齐2个集合下拉列表并使其内联[drop 1][drop 2] 例如: http://simple-form-bootstrap.plataformatec.com.br/articles/new 显示如何对齐复选框和radiobuttions, 但我不能,无论我试图对齐2个收集下拉列表后,彼此内联 尝试了我在这里和在线找到的所有解决方案,包括包装器内联、类内联等。没有任何效果: = f.input :age_from, :collection =>
http://simple-form-bootstrap.plataformatec.com.br/articles/new
显示如何对齐复选框和radiobuttions,
但我不能,无论我试图对齐2个收集下拉列表后,彼此内联
尝试了我在这里和在线找到的所有解决方案,包括包装器内联、类内联等。没有任何效果:
= f.input :age_from,
:collection => 18..60,
:selected => 18,
:label => 'Age from',
:style => "width: 85px !important"
= f.input :age_to,
:collection => 18..60,
:selected => 55,
:label => 'Age to',
:style => "width: 85px !important"
HTML:
一种选择是只使用引导布局div标记来对齐它们。我使用的是公元前3年的span3,我的总表格是span6,但您可以根据需要修改它
<div class="row">
<div class="span3"><%= f.input :age_from, :collection => 18..60, :selected => 18, :label => 'Age from', :style => "width: 85px !important" %></div>
<div class="span3"><%= f.input :age_to, :collection => 18..60, :selected => 55, :label => 'Age to', :style => "width: 85px !important" %></div>
</div>
一种选择是只使用引导布局div标记来对齐它们。我使用的是公元前3年的span3,我的总表格是span6,但您可以根据需要修改它
<div class="row">
<div class="span3"><%= f.input :age_from, :collection => 18..60, :selected => 18, :label => 'Age from', :style => "width: 85px !important" %></div>
<div class="span3"><%= f.input :age_to, :collection => 18..60, :selected => 55, :label => 'Age to', :style => "width: 85px !important" %></div>
</div>
这是一个客户端问题。请显示相关的HTML+CSS,而不是您的服务器端代码。Diodeus:不要认为这是CSS问题,我认为HTML的格式不正确,因为我没有使用正确的解决方案。提供的html+css用于正常工作显示。堆栈上simple_表单的所有内联选项我都尝试过了,但都无效这是客户端问题。请显示相关的HTML+CSS,而不是您的服务器端代码。Diodeus:不要认为这是CSS问题,我认为HTML的格式不正确,因为我没有使用正确的解决方案。提供的html+css用于正常工作显示。堆栈上的simple_表单的所有内联选项我都尝试过,但没有尝试过更花哨的东西,但我会尝试,希望尝试更花哨的东西,但我会尝试
<div class="row">
<div class="span3"><%= f.input :age_from, :collection => 18..60, :selected => 18, :label => 'Age from', :style => "width: 85px !important" %></div>
<div class="span3"><%= f.input :age_to, :collection => 18..60, :selected => 55, :label => 'Age to', :style => "width: 85px !important" %></div>
</div>