I am trying to get a checkbox next to it's label, and centered vertically against that label, in a Ruby on Rails form. Ideally, those would also both be in line with the Submit button.
I am using Zurb Foundation. Despite combing through the documentation, I can't get it to work. I've tried many incarnations, but here is one:
<div class="row collapse">
<div class="large-4 columns">   </div>
<div class="large-4 columns">
<%= f.check_box :remember_me %>
<%= f.label :remember_me, 'Remember me' %>
<div>
<%= f.submit "Sign in", class: "button" %>
</div>
</div>
<div class="large-4 columns">   </div>
</div>
Generated HTML:
<div class="row collapse">
<div class="large-4 columns">
<input name="user[remember_me]" value="0" type="hidden"><input id="user_remember_me" name="user[remember_me]" value="1" type="checkbox">
<label for="user_remember_me">Remember me</label>
<div>
<input class="button" name="commit" value="Sign in" type="submit">
</div>
</div>
</div>
Generated HTML also shows the load order for css files here:
<link href="/assets/application.css?body=1" media="all" rel="stylesheet">
<link href="/assets/foundation_and_overrides.css?body=1" media="all" rel="stylesheet">
<link href="/assets/custom.css?body=1" media="all" rel="stylesheet">
3 hours spent so far trying to put a checkbox next to its label. Makes me appreciate Excel a bit more. Thanks for your help in advance.
UPDATE:
The following code has put everything on one line, but is not vertically aligning the button and the label. Removing .inline has no effect,
<div class="row collapse">
<%= f.check_box :remember_me, class: 'left inline' %>
<%= f.label :remember_me, 'Remember me', class: 'left inline' %>
<%= f.submit "Sign in", class: "button right" %>
</div>