Sunday, 29 October 2006
Valid CSS and XHTML that Doesn't Display on Mozilla or Firefox
« Mobile Phone Journalism | Main | Flash 8 Not Starting »
Today I was working on a website and I wanted to stick to the W3C standards. Although my website validated xhtml strict, css, and priority 1 and 2 WAI accessibility guidelines using Watchfire, it didn't show on my Windows box in Firefox or Mozilla. I couldn't figure out what was going on. The CSS displayed fine even in IE. I downloaded Firebug, an add-on to Firefox that lets you explore the DOM of a page with your mouse. It just so happens that my web server's mime type for .css files was coming out as text/html instead of text/css. Whoo!
An easy fix is to add a .htaccess file in your home directory with the following:
AddType text/css .css
That's it!
A good article from Community MX on Common Coding Problems with HTML and CSS was quite helpful as well.
Posted by at 1:35 PM in Software/
