Forum Moderators: phranque

Message Too Old, No Replies

Apache not including css

Apache does not include css file on index.html using <link href=css.css>

         

dantesEdge

3:26 pm on Aug 17, 2011 (gmt 0)

10+ Year Member



Hello All,

I know you're going to cringe when I say this, but:
    I am a complete Apache noob.

I have been learning for the past 2 days, and have gotten my webserver up and running, and doing what I want except for one small hiccup.

When using

<link href="/includes/css.css" rel="stylesheet" type="text/css">


In the <head></head> of my index.html page, no css is present in the document. I was wondering if anyone would know why this is?

Before you begin questioning, let me cover a few bases:

1. I can access /includes/css.css from my url bar and see the plaintext css file fine.
2. There are no error messages in apache2/error.log pertaining to css (There were at one point saying file not found, and access denied, but those have since been fixed)
3. When adding the css inling and as an internal stylesheet in the <head></head> it works fine.

Would there be some reason for apache simply not being able to include css files?

Thanks in advance for any and all help supplied! :)

EDIT: Oh guys, I obviously searched before I posted this and came across this thread with my EXACT PROBLEM! :)

[webmasterworld.com...]

Only thing is it was never answered... And its 5+ years old :(

dantesEdge

4:03 pm on Aug 17, 2011 (gmt 0)

10+ Year Member



After some quick experimenting, Turns out that the newest version of Internet Explorer (IE9) displays the page correctly and includes the css.

Firefox and Google Chrome however, do not.

Any clue why this would happen? :S

lucy24

6:54 pm on Aug 17, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I really doubt this is an Apache problem. As you note yourself, nothing is coming up in the error logs. I think it's just HTML. Or XHTML. You don't say which you're using, but the difference may be significant. It has no effect on the css but it changes the mandatory link format.

Before you start tearing out your hair, feed both the (x)html and the css into their respective validators.