Domanda

I've installed foundation into my Rails project using their gem and running the following 2 commands:

rails g foundation:install
rails g foundation:layout

Everything seems to be working great, the nice CSS markup and grid layout. However, my radio buttons and checkboxes don't look any different. The page that describes radio buttons and checkboxes says, "Once initialized (they're referring to jquery.foundation.forms.js which was automatically included in every Rails page) it will look for any checkbox, radio button, or select element and replace it with custom markup that Foundation provides styles for."

But my radio buttons and checkboxes look standard, not like the beautiful ones on the above example page. They suggest to set display: none; on the inputs with some custom markup to avoid the flash from normal to foundation buttons/checkboxes. That doesn't help. I even did a copy-and-paste from their example webpage to my webpage! Still no luck! Am I missing something?

I'm using Rails 3.2.8

È stato utile?

Soluzione

The problem was I needed to add the class custom to the form element. Apparently all other Foundation elements work without that class, except radio buttons and checkboxes.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top