External CSS not loading


#1

Linking to external style sheets just flat out doesn’t work at all when I upload my finished site to the ftp. I’ve no idea what I’m doing wrong. They seem to work perfectly when I browse the site from my own computer.

This is an example of the html I have placed in the header of just about every page. I store all of the external style sheets in the same folder as my html files.

I’m pretty sure it’s just a simple mistake on my end. The site needs to be fully operational ASAP, so quick help/feedback would be greatly appreciated.


#2

First thing you do: attempt to browse directly to the CSS file. If it’s “not found” or some other error, of course it won’t load when you visit the page.

ie if your domain is example.com browse to http://example.com/index.css


#3

As Atropos7 said, check the response code. Also check the permissions on the server. Make sure you don’t have it blocked (such as in an .htaccess file). Also, try adding a leading / before the file name (shooting in the dark on that one).


#4

I don’t think a leading / alone would help in the filename but i would definitely suggest a leading ./ (or period slash)

a single period means “the current directory”
(and … or two periods means “the parent directory”, or the directory above this one)

Basically when . or … is used they replace the leading part of the path with "the fully qualified path to get to the current directory . or to the parent …