Topic: How to include style sheet in my application.

I have placed the global.css under the public/stylesheets folder. I have included <%= stylesheet_link_tag "global.css" %> in the form.rhtml. But How should I add the stylesheet property to the textbox that I have.
eg:
<tr>
      <td><label for="register_user_name">User name</label></td>
      <td><input type="text" class="clearfix"><%= text_field 'register', 'user_name' %></td>
</tr>

Is this way of including the styles is correct.

secondly I need to include the header image and footer image in my page. How should I do that. I have placed the image under public/images folder.


Please help me in this regard.


Thanks
Janakiraman

Re: How to include style sheet in my application.

For the text box:

<%= text_field 'register', 'user_name', :class => "your_class" %>

For the image:
<%= image_tag "whatever.gif", :alt => "Your ALT Text" %>

This will add /images/ to the start of the filename for you, so by entering whatever.gif the actual image path will be "/images/whatever.gif"

PS: this is Rails programming not Ruby programming

Last edited by shadow (2007-04-03 09:15:28)