Do this instead of directly linking to the stylesheet:
<%= stylesheet_link_tag("xyz") %>
This will compile into the correct css link tag ion the html output.
Notice that you don''t use the .css extension in the method. So if
your stylesheet is called mystyle.css you would just use "mystyle" in
the code. You use a similar method for javascript:
<%= javascript_include_tag("myjs") %>
Hope that helps
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
509-577-7732
On Jun 28, 2005, at 9:23 PM, Reshama wrote:
> Hi,
> I have just started working on Ruby on Rails. I am using the
> default WeBrick
> server and have created sample application FormTest in the Rails
> directory.
> There is a .rhtml file in the view section of apps directory and I
> want to apply
> a css to the same. I have placed the .css file in the public/
> stylesheets folder
> and am importing this with path as "/stylesheets/xyz.css". The
css
> does not
> load. I am using firefox. What am i doing wrong? Please help!
> Thanks!
> Reshama
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>