twitter/bootstrap — Issue #2406: Boolean checkboxes doesn't work in a normal Rails application
Author: rafaelfranca
Created: 2012-03-05 13:54:34+00:00
State: open

This is the generated HTML for the Rails application:

![Generated Rails HTML](http://cl.ly/0t0k0z1w442x2Y2J0G3s/Screen%20Shot%202012-03-05%20at%2010.40.21.png)

And this is the result:
![Result](http://cl.ly/2F3w1c3C043q0q272F16/Screen%20Shot%202012-03-05%20at%2010.40.06.png)

This is caused because twitter bootstrap only add the padding-top to the first child that in a Rails application [need to be the input hidden](https://github.com/rails/rails/blob/defb751681640e11f2187439acdaaa12ca9b805f/actionpack/lib/action_view/helpers/form_helper.rb#L788-839).

```css
.controls > .radio:first-child, .controls > .checkbox:first-child {
padding-top: 5px;
}
```