?
Solved

Firefox and link rel="stylesheet"

Posted on 2005-04-21
8
Medium Priority
?
1,031 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:Coolhand2120
  • 5
  • 3
8 Comments
 
LVL 9

Expert Comment

by:lombardp
ID: 13840587
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"

0
 
LVL 2

Author Comment

by:Coolhand2120
ID: 13855519
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
0
 
LVL 2

Author Comment

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

-Coolhand2120
0
Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

 
LVL 2

Author Comment

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

-Coolhand2120
0
 
LVL 9

Expert Comment

by:lombardp
ID: 13856713
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>
0
 
LVL 2

Author Comment

by:Coolhand2120
ID: 13862256
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
0
 
LVL 9

Accepted Solution

by:
lombardp earned 2000 total points
ID: 13862429
Coolhand2120,

I downloaded your files and I had the same problem you described, but when:

- I replaced     href="/style30.css"           with       href="./style30.css"
- I removed     <style><!-- --></style>    from the CSS

everything perfectly worked.


Please, try to make the above two little changes, both of them together (very important).

0
 
LVL 2

Author Comment

by:Coolhand2120
ID: 13863236
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

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Following on from our article on "The Murky World of Consent and opt in", we thought we would issue some helpful guidance, not only on consent itself but knowing what information you are capturing, what you are doing with this data and how you can p…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question