Where to place css files

Hi All,

I Have a .css file to effect those styles to my view where do i need to
place in Rails directory stucture and how can i use the .css file name
in my view
My view file is in “app\views\home”.

Can any one please suggest me
Thanx
Chinna

Hi Chinna Gogulapati

You can place css files in public/stylesheets folder  and can be 

linked to it by using stylesheet_link_tag helper in your layout file.
As an example suppose a css file say example.css in public/stylesheets
Now in app/views/layouts/application.html.erb(Or which ever layout you
use) add this in section.

stylesheet_link_tag “example.css”

Sijo

Sijo k g wrote:

Hi Chinna Gogulapati

You can place css files in public/stylesheets folder  and can be 

linked to it by using stylesheet_link_tag helper in your layout file.
As an example suppose a css file say example.css in public/stylesheets
Now in app/views/layouts/application.html.erb(Or which ever layout you
use) add this in section.

stylesheet_link_tag “example.css”

Right. I would also very strongly suggest not using straight CSS.
Sass and Compass can abstract your CSS into a much more maintainable
form and completely do away with the need for presentation-based
classes.

Sijo

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]