How to Apply styles in rhtml

Hi,

I am new to RoR environment. I want to apply a class from my stylesheet
to particular button element in my rhtml file. the class in my styesheet
is :-

buttonstyle{
color: #FFFFFF;
border-style: solid;
border-width: 0;
background-color: #008000
}

We can apply this class in stylesheet to button in HTML as follows:-

But same thing I want to achieve inside " <%= submit_tag “Register” %>"
.
How to do this? That is here I want to add this style only to some
buttons inside my rhtml file . How to do this?

please help me.

Thanx.

Hi,

I am new to RoR environment. I want to apply a class from my stylesheet
to particular button element in my rhtml file. the class in my styesheet
<…>
But same thing I want to achieve inside " <%= submit_tag “Register” %>"
.
How to do this? That is here I want to add this style only to some
buttons inside my rhtml file . How to do this?

<%= submit_tag “Register”, :class => :buttonstyle %>

Regards,
Rimantas

http://rimantas.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs