Link to home
Start Free TrialLog in
Avatar of Coolhand2120
Coolhand2120Flag for United States of America

asked on

Firefox and link rel="stylesheet"

When I link to a stylesheet, firefox won't use it!  If I put the same stuff in <style> </style> it works fine.  It works in every other browser. How do I fix it?

http://www.claydesign.com
http://beta.claydesign.com

Thanks

-Coolhand2120
Avatar of lombardp
lombardp

You used this syntax for CSS link: href="/style30.css", that is not valid for Mozilla/Firefox

Try using:      href="./style30.css"
Or:                href="style30.css"

Avatar of Coolhand2120

ASKER

I tried ./style30.css and it still dosen't work.  I can't use "style30.css" becuase it may not be in the current directory.  Is there somthing else I'm missing?

-Coolhand2120
BTW I did't get an email reguarding your response, sorry I took so long to respond.

-Coolhand2120
And href="style30.css" dosen't work either.  Am I inserting it too soon/late?

-Coolhand2120
Ok, I think I have found the problem:

In your CSS you placed also HTML tags, while in CSS files you have to place ONLY CSS style rules, no tags.
Remove the following:

<html><head><style type="text/css">
<!--


-->
</style></head>
<body></body></html>
The CSS sheet dosen't have <body><html><head> in it, I tried removing the <style><!-- --></style> from the stylesheet and I still won't work in FF.  But it sill works in IE.  I'm really beginning to like firefox a lot less than I already disliked it.  
Lack of standards compliancy is not good, and now css won't link!

-Coolhand2120
ASKER CERTIFIED SOLUTION
Avatar of lombardp
lombardp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I figured it out.  All the above should and does work, the probelm was an internal server probelm.  The file "/style30.css" or any .css file are being dynamicly created with a tool from www.helicontech.com called ISAPI rewrite.  It allows me to make URLs to files like "/style30.css" that actualy call up "/fcss.asp?xx=30" internally,  really neat program.  Lets you make dynamic CSS.  URLs that point to HTML pages that are actualy dynamic ASP pages.

So what was the probelm?

Seems the URL rewriting program didn't rewrite the MIME type (which is good).  IE accepts CSS sheets with the MIME type text/HTML where FF only accepts CSS sheets with the MIME type text/css.  The fix was in the ASP script:

Response.contenttype = "text/css"

This overrides the default MIME type and sends the one you specify.  The server saw the extention of the file as ASP internally, renderd the page, and set the default MIME type to "text/HTML".

Thanks for all the help though!  I went to irc.mozilla.org and just bugged pepole until I figured it out.

-Coolhand2120

P.S.: I'll bet every combonation of <style> ./ / style etc. all work hehehe