ruby on rails - Rearranging Formtastic layout -


i'm new formtastic , pretty unexperienced when comes css , stylesheets.

i'm trying rearrange layout bottom of picture: http://img242.imageshack.us/img242/3971/layoutiy.jpg can see managed make dropdowns align nicely, not fee/consultant hours.

this .erb file;

<div id="defaults">     <% semantic_form_for <more stuff goes here> %>     ......     <div id="customer-details">         <%= form.input :fee %>         <%= form.input :consultant_hours %>          <%= form.input :automatic_prolonging, :as => :radio, :collection => [[("yes"), "true" ]] + [[("no"), 'false']], :wrapper_html => { :class => "compact" } %>         <%= form.input :customer_segment, :as => :radio, :collection => [[("industry"), "industry" ]] +[[("bank/finance"), "bank/finance" ]] + [[("products/services"), 'products/services']]+ [[("organization"), 'organization']]+[[("other"), 'other']], :wrapper_html => { :class => "compact" } %>     </div>     <% end %> 

i edited formtastic_changes.css file follows:

#customer-details li{     clear: none;     float: left;     padding: 0;     height: 60px;     margin-right: 40px; }  #customer-details .compact ol li, #social-post-defaults .compact ol li, #customer-details .compact ol, #social-post-defaults .compact ol {     width: 220px !important;      height: auto !important; }  #customer-details .compactselect, #social-post-defaults .compactselect {     width: 160px !important; }  #customer-details .compactselect ol, #social-post-defaults .compactselect ol {     width: 220px !important; }  #customer-details .compactselect .field,  #social-post-defaults .compactselect .field {     width: 146px !important; }  #customer-details .compactselect ol li,  #social-post-defaults .compactselect ol li {     width: 160px;     height: auto !important;     white-space: nowrap; }  #customer-details .string input {     width: 285px;     margin: 2px 0 5px;     padding: 2px;     font-size: 13px; } 

and problem. no matter how change width attribute, nothing changes. if remove ".string", width changing works, fields still don't align next each other over/under each other.

i've watched both formtastic tutorials on railcasts , looked through formtastic rdoc still don't seem able solve problem.

can nudge me in right direction? thankful help.

@emil: try

#customer-details input {     float: left;     font-size: 13px;     margin: 2px 0 5px;     padding: 2px;     width: 285px; } 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -