# Actions have no CSS?

**URL:** <https://www.ruby-forum.com/t/actions-have-no-css/114174>\
**Category:** Rails\
**Created:** [September 9, 2007, 4:29am UTC](https://www.ruby-forum.com/t/actions-have-no-css/114174 "2007-09-09T04:29:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [September 9, 2007, 4:29am UTC](https://www.ruby-forum.com/t/actions-have-no-css/114174/1 "2007-09-09T04:29:21Z")

</div>

Hi everyone,

I’ve started a new site from scratch. It’s quite straightforward and  
nothing special. I have a simple controller with just a few actions.  
I have one style sheet and the majority of the site is held in  
application.rhtml. The controller is “site”

If I view the site (via webrick) at localhost:3000/site it looks great  
if I view another action at localhost3000/site/test it renders with no  
CSS  
if I view the site at localhost:3000/site/index it renders with no CSS

In the second case I thought I must have a bug in my code causing the  
CSS to not render. That is when I noticed that /site rendered ok but  
/site/index did not. Aren’t they fundamentally equivalent? Why would  
they be handled differently and what could I have done to cause the CSS  
to not render?

Thx!

Gary

---

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [September 9, 2007, 4:48am UTC](https://www.ruby-forum.com/t/actions-have-no-css/114174/2 "2007-09-09T04:48:22Z")

</div>

On Sep 8, 2007, at 10:27 PM, Gary H. wrote:

> In the second case I thought I must have a bug in my code causing the  
> CSS to not render. That is when I noticed that /site rendered ok but  
> /site/index did not. Aren’t they fundamentally equivalent?

/site should cause /site/index to render. look at the rendered html  
and see what css is included and referenced. i’m guessing you have  
relative paths to linked css files.

-faisal

---

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [September 9, 2007, 4:48am UTC](https://www.ruby-forum.com/t/actions-have-no-css/114174/3 "2007-09-09T04:48:22Z")

</div>

Sorry to waste listspace. It ended up being simple (of course). I  
started with a third party template and I did not change the existing  
stylesheet to a stylesheet\_link\_tag and the existing path was  
relative not absolute ☹
