Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何使用Ruby设置相邻表单的样式_Css_Ruby On Rails_Ruby_Forms_Styling - Fatal编程技术网

Css 如何使用Ruby设置相邻表单的样式

Css 如何使用Ruby设置相邻表单的样式,css,ruby-on-rails,ruby,forms,styling,Css,Ruby On Rails,Ruby,Forms,Styling,我正在尝试将表单样式设置为具有以下布局: [DateBegin] [DateEnd] .Input field. .Input field. 这在RoR中是可能的吗?如果是这样的话,我怎么做呢,我试过了,但显然没有用,我必须用div来设计它吗?我正在使用bootstrap,如果有一个好的bootstrap解决方案,我也很想知道,下面是您请求格式的示例视图,字段是date_begin和date_end <div class="row"> <div class="c

我正在尝试将表单样式设置为具有以下布局:

[DateBegin]     [DateEnd]
.Input field.  .Input field.

这在RoR中是可能的吗?如果是这样的话,我怎么做呢,我试过了,但显然没有用,我必须用div来设计它吗?我正在使用bootstrap,如果有一个好的bootstrap解决方案,我也很想知道,下面是您请求格式的示例视图,字段是date_begin和date_end

<div class="row">
  <div class="col-sm-6">
    <div class="form-group">
       <%= f.label :date_begin,"Label for Date begin" %>
       <%= f.text_field :date_begin, :class => 'form-control' %>
    </div>
  </div>
  <div class="col-sm-6">
    <div class="form-group">
       <%= f.label :date_end,"label for date end" %>
       <%= f.text_field :date_end, :class => 'form-control' %>
    </div>
  </div>
</div>  

'窗体控件'%>
'窗体控件'%>