在活动管理员的表单中,字段根据窗口的大小在页面上水平扩展.如果它是一个大显示器,右边有很多“未使用”的空间. 如何在页面右侧添加“列”(不是侧栏),这样我最终会在左侧的表格
如何在页面右侧添加“列”(不是侧栏),这样我最终会在左侧的表格中放置50%宽度的部分,在右侧放置50%宽度的部分?
我需要这个,因为我有很多领域.
这就是我的表格现在部分看起来像…
form do |f| f.inputs "Shipment Details" do f.input :file_number f.input :customer, :label_method => :company_name f.input :shipper, :label_method => :company_name f.input :broker, :label_method => :company_name end f.inputs "Places" do f.input :place_of_origin, :as => :select, :collection => Place.find(:all, :order => "city", :select => "city").map(&:city) f.input :place_of_loading, :as => :select, :collection => Place.find(:all, :order => "city", :select => "city").map(&:city) f.input :place_of_delivery, :as => :select, :collection => Place.find(:all, :order => "city", :select => "city").map(&:city) f.input :via, :as => :select, :collection => Place.find(:all, :order => "city", :select => "city").map(&:city) end f.inputs "Carrier" do f.input :carrier, :label_method => :company_name f.input :mode, :as => :select, :collection => ["Air", "Air Collect", "Air Prepaid", "FCL", "FTL", "LCL", "LTL", "TBA"] f.input :mbl, :label => "MBL" f.input :hbl, :label => "HQL" f.input :vessel f.input :container end f.buttons end这很简单,你可以给输入的每个部分一个CSS类,然后你可以修改active_admin.css.scss(或只是.css),这样它会将你的表单浮动到正确的位置,并给它们一个正确的宽度等