[ACCEPTED]-Using CSS to style Ruby objects in erb-css
Accepted answer
You can use the :class
option to specify a CSS 2 class:
<%= f.text_field :email, :class => "login" %>
and then put that in your css:
input.login {
color: red;
}
Also, you 1 can specify inline CSS if you want:
<%= f.text_field :email, :style => "color: red;" %>
Adding on to what Dylan said...
You can use 2 :id option to specify a CSS id:
<%= image_tag "illustrations/clipboard.png", :id => "clipboard" %>
and then 1 put in your css:
#clipboard {
border: 1px solid #000;
}
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.