Having trouble center aligning all the form elements in a simple_form-built form? I attempted to do so by creating a .simple_form class and adjusting attributes like float, text-align, etc. However, my efforts were unsuccessful.
.simple_form {
float: none;
text-align : center;
margin-right: auto;
margin-left: auto;
position: auto;
}
/*
.simple_form label {
float: left;
width: 100px;
margin: 2px 10px;
}
.simple_form div.input {
margin-bottom: 10px;
margin: 2px 10px;
}
.simple_form div.boolean, .simple_form input[type='submit'] {
margin-left: 120px;
margin: 2px 10px;
}
.simple_form div.boolean label {
float: none;
margin: 0;
margin: 2px 10px;
}
*/
HTML
<h1>Submit page </h1>
<%= simple_form_for Post.new do |f| %>
<%= f.input :title %>
<%= f.input :blurb %>
<%= f.input :funding_goal %>
<%= f.input :funding_duration %>
<%= f.button :submit %>
<% end %>