3 replies [Last post]
animgirl
animgirl's picture
Offline
newbie
Last seen: 17 years 41 weeks ago
Joined: 2004-04-21
Posts: 4
Points: 0

Hello guys and gals,

I'm having an issue getting some css on a site to load in Firefox online.
The site works great in Firefox on my localhost, and the html validates correctly. There are propertires x'ed out in the css that I know are there, but it's not affecting what's going on.

When http://beta.scottgregus.com/ first loads in Firefox, there are no stylesheets present. When I do ctrl+8 to open the css editor, the styles load and everything looks okay. I would think it to be just me, but other people can't load the styles either.

When I view this site on localhost in Firefox, the styles load automatically as they should.

Any ideas?
Thank you so much,

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 3 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

CSS won't load in Firefox

Hi there,
It's an odd one as you say if you use 'editcss' extension in Firefox it loads the style sheet and I can't quite see why. I can only suggest trying a few things which you may have tried anyway.

It shouldn't matter but comment out the 'x' with the normal '/**/'
Try setting the media type to 'all' rather than 'screen' .
remove the IE conditional comment styles just in case they are throwing things off.
The page doesn't validate as you need to 'quote' out all values (height and width need "350") but again this shouldn't cause a problem at this stage ? or maybe it would, you could try a transitional dtd to see if it changes matters.

More than that is beyond me, hopefully someone else will come along with more knowledge.

Good luck,
Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

zendakk
zendakk's picture
Offline
newbie
Heidelberg, Germany
Last seen: 18 years 9 weeks ago
Heidelberg, Germany
Timezone: GMT+1
Joined: 2003-11-27
Posts: 7
Points: 0

CSS won't load in Firefox

Hey,

I just checked the server response headers on http://beta.scottgregus.com/styles/styles.css and your online server is sending "Content-type: text/html". The proper MIME-type should be "text/css".
Your local server probably does it correctly, that's why it works there. And as we know Firefox is very strict about mime-type handling, so that would explain why the CSS loads in IE -- IE is simply more forgiving.

So I would say there's nothing wrong with your CSS code or the way you're calling it from your html page. Check with the server's host admin to see about the mime-type for .css files.

Hope I'm right and that it helps
Cheers

animgirl
animgirl's picture
Offline
newbie
Last seen: 17 years 41 weeks ago
Joined: 2004-04-21
Posts: 4
Points: 0

CSS won't load in Firefox

Wow this was really dumb of me. You were right zendakk. I got to wondering and took at look at my .htaccess. I had css in my line of add/type applications, so it was getting parsed as html.

Thank You so much,