Jack Trowbridge
Jack Trowbridge

Reputation: 3251

Firefox Demands Absolute URL For Referencing Stylesheet

I just spend the last few hours debugging a huge problem, the problem being,

My external css style sheet were not loading when I used Firefox.

Using Firefoxes debugging tools I was able to conclude that the file was not been found, it had nothing to do with the MIME type or encoding as I checked.

I was using relative URL's to reference my style sheets to I decided to use absolute and it worked! after hours of nearly losing my mind.

However using absolute URL's on every page is just a pain and not practical if I am debugging on localhost all the time.

Could anyone tell me why I need to proved the absolute URL's? The CSS file is there and Firefox states the relative URL and when I go to it manually, it works, however Firefox will just not find it. Every other browser including Chrome and Safari Works with the relative URL's.

I could use php and define all these relative URL's and then reference these within my HTML making it easier to switch domains for debugging but still its a pain and I don't know why I have to do this.

My site here

Thanks in advance,

Jack.

Note : For testing reasons I am giving the link to my site which I am having problems with, nothing to do with advertising.

Upvotes: 0

Views: 110

Answers (1)

user1864610
user1864610

Reputation:

For your stylesheet problem: change the backslash to a forward slash in your <link> element.

<link rel="stylesheet" href="css/main.css">

There are a couple of images with a similar problem.

You have a number of other errors: <script> tags between <head> and <body>, and some loose </article> tags as well

If you're using Firefox, take a look at the page source and fix anything you see highlighted in red. Then try again.

Upvotes: 1

Related Questions