[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[NUBY] Rails css files?

steven_todd_harris

12/12/2004 3:04:00 AM

I was trying to add a css file to my view in rails and I had some
trouble
figuring out where I should put the file. Should it be somewhere under
public?
Doesn't seem to work if it's under the view directory structure with
the .rhtml file.

2 Answers

Sascha Ebach

12/12/2004 4:22:00 AM

0

steven_todd_harris@yahoo.com wrote:
> I was trying to add a css file to my view in rails and I had some
> trouble figuring out where I should put the file. Should it be somewhere under
> public?

Yes. Everything accessible by the web browser should be in the public
dir. If you make a public/css dir and put a file called layout.css in it
you could do

<link rel="stylesheet" type="text/css" media="screen"
href="/css/layout.css" />

--
Sascha Ebach


jblomberg

12/12/2004 8:41:00 AM

0

There is a folder for this purpose located at
your_project_home/public/stylesheets.

steven_todd_harris@yahoo.com wrote:
> I was trying to add a css file to my view in rails and I had some
> trouble
> figuring out where I should put the file. Should it be somewhere
under
> public?
> Doesn't seem to work if it's under the view directory structure with
> the .rhtml file.