My CSS file won't show (even though everything says it should)

i can’t get my app to use my css file (unless i remove the !DOCTYPE).
in development mode with webrick i don’t have this problem, only here
in production with mod_rails:

<VirtualHost *:80>
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /services/httpd/mysite.com/public
<Directory “/services/httpd/mysite.com/public”> # give apache access
to the public/ folder…
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

RailsBaseURI /

i call my stylesheet like this:

<%= stylesheet_link_tag ‘display’ %>

which ends up looking like:

i can access http://www.mysite.com/stylesheets/display.css just fine.

i just don’t get it…

by removing from my header though, everything
works, but i’m not removing my doctype…

thanks.

is it possible that HTML4 would not like the self-closed tag?
try hard coding a

or using a more up to date doctype (e.g. XHTML 1 transitional) and see
if that makes and difference

Try clearing your sessions and/or restarting your server. (Who
knows.)

-Kyle

Hi, I would recommend checking your HTML against the following:
http://validator.w3.org/check

Next, is there a particular reason why you’re not using XHTML?

Good luck,

-Conrad

No, no reason, I just switched to XHTML now :slight_smile:

Problem fixed though, turned out to be a lack of mod_mime in Apache.

Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs