PHP, MySQL, HTML, CSS, Javascript, AJAX, SEO, Web Development, Joomla, Web 2.0


Web World Guru

CSS problem in Firefox or Netscape due to Incorrect MIME type

Many time i have came across a problem, in which the website look excellent in Internet Explorer and all distorted in Firefox. The problem here is Firefox is not able to interpret css file. And therefore the page layout is distorted in Firefox.

This is becouse the web server/web host where your site is hosetd is not properly configured. Apache web servers are associating files having a .CSS with an incorrect MIME-type such as "text/plain". In some cases, Netscape 7.x and Mozilla ignore the CSS file because of its wrong MIME type and use a default style sheet that causes the layout to be different from what was intended by the web developer.

Solution to CSS problem due to Incorrect MIME type:

If you are using Apache, you could change configuration of the .htaccess file in your root directory (The .htaccess file is a read-only configuration file that handles a few things including MIME types.).

Add this line to your .htaccess file: AddType text/css .css

Using a strict document type definition with Firefox means that the web server that serves your web pages needs to be configured appropriately. There are several different solutions to this problem, but the ultimate is to have the correct MIME type associated with .css files. So request you web host provider to configure the server properly.

 

 
Alexa Ranking for WebWorldGuru
You are here  : Home CSS CSS Problems And Solutions CSS problem in Firefox or Netscape due to Incorrect MIME type