WebDesign: CSS and FireFox
October 1, 2004 9:19 PM   Subscribe

So I have this home page. It looks pretty good (which is to say, it looks like I intended) in Safari, and passable in Internet Explorer. But in FireFox the CSS completely dissapears for some reason, so everything just comes up in a big unstyled pile. So in trying to find out why this is, which I have not done, I came to wonder: Is there a place on the web that has information about the differnces between browsers and how they render various bits of HTML, CSS and so on?
posted by donkeymon to Computers & Internet (9 answers total)
 
Looks like you have a *lot* of errors on the page. Fix those and it'll be much easier to troubleshoot.
posted by mathowie at 9:31 PM on October 1, 2004


Also, I'm guessing the stylesheet being served up as a perl script probably isn't being sent as text/css.
posted by mathowie at 9:33 PM on October 1, 2004


what mathowie said...

Also, it may work out better for you in the future to write your HTML to validate against the standards first, then try to fix it to work in the browsers it doesn't render properly in. Rather than writing it to work in one particular browser, then trying to make it work in all the other browsers afterwards.

It's a lot less work that way, now that most browsers are at least somewhat standards-compliant.
posted by mkdg at 10:20 PM on October 1, 2004


In the stylesheet, you have a number of lines inexplicably begun by a single leading slash. Were you perhaps trying to comment out lines of the CSS? CSS comments follow the form
/* the comment */
The slashes you have might well be confusing the browser.

I don't think what mathowie pointed out is the likely culprit, since the stylesheet is properly declared as text/css in the HTML, so the fact that the perl script sends it as text/html shouldn't matter. However, you also have a number of other minor errors in the CSS, like some missing semicolons, as well as a bunch of (mostly minor) errors in the HTML. The HTML validator and the CSS validator are your friends for hunting those down.

Nice design, btw.

posted by kickingtheground at 11:02 PM on October 1, 2004


Well, thanks regarding the design. I know that there are a lot of other errors in there. I'm always in the process of not finishing a million little ideas, so there's massive cruft. I have a link to the WC3 validator in the page, specifically to point out how many errors there are.

It seems like the specific error in this case is that Firefox doesn't like my trying to use a perl script outputting as "text/html" for my CSS. It appears to be important to Firefox, but not to other browsers that the perl script output as "text/css". When I changed the output from the perl script to "text/css" it worked fine. So our Dear Leader is right again.

Anyway, the point of the question was not to get my site critiqued (not that I am not grateful); I really want to find out about some places to find information about browser compatibility and things of that nature. For example, is it written somewhere on the web that Firefox needs CSS in "text/css" and not "text/html"? Where would I go if I wanted to find out things of that nature, although maybe not of that level of obscurity?
posted by donkeymon at 12:17 AM on October 2, 2004


Try this link from Eric Meyer's css page. It looks like it's a bit out of date, but you could probably find some links that will get you there. The meyerweb is a great place to get css info anyway.

Css standards
posted by jeremias at 7:10 AM on October 2, 2004


Specifically, here is Mozilla's Css page.
posted by jeremias at 7:13 AM on October 2, 2004


The css-discuss mailing list [css-d] has a wiki that's a good place to start for all types of questions about CSS, including browser compatibility issues:
http://css-discuss.incutio.com/
posted by mkdg at 7:16 AM on October 2, 2004


Firefox is strangely picky about mimetypes. Most browsers don't really seem to care, but Firefox will ignore any CSS, images etc. that you serve as text/html (at least in my experience).
posted by reklaw at 6:12 PM on October 2, 2004


« Older USAFilter   |   Can You Hear Me? Newer »
This thread is closed to new comments.