Gurmukh Singh
Gurmukh Singh

Reputation: 2017

rails select option styling with bootstrap

I have a select option in my rails application:

<%= f.select :willingToRelocate, ['Yes', 'No'] %>

It works fine, now I'm trying to style it with bootstrap, but can't get style to work.

This is whats on the bootstrap guide:

<select class="form-control">
  <option>1</option>
  <option>2</option>
  <option>3</option>
  <option>4</option>
  <option>5</option>
</select>

And heres a link to the bootstrap styling doc: http://getbootstrap.com/css/

Upvotes: 1

Views: 633

Answers (1)

Kevin Etore
Kevin Etore

Reputation: 1124

You could style it like this <%= f.select :willingToRelocate, ['Yes', 'No'], {}, class: 'form-control'} %>

You could check out this link. The api.rubyonrails have a great amount of information that you could use for these kind of problems.

Upvotes: 3

Related Questions