There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot computer connection crash css dell drive driver drivers email error ethernet excel explorer firefox firefox 3 freeze hard drive internet internet explorer itunes laptop linux malware monitor network networking outlook outlook 2003 outlook express password printer problem problems ram router security slow software sound trojan usb virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
SOLVED: XHTML and Firefox problem


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Mikrondel's Avatar
Member with 49 posts.
 
Join Date: Jun 2005
Location: Australia
Experience: Budding Genius
06-Nov-2007, 07:53 PM #1
SOLVED: XHTML and Firefox problem
Seeing as googling and forum searching brought precious little help, I thought I'd post this to help people with a similar problem in the future.

Problem: Styles not being applied in Firefox under XHTML 1.0 transitional, but worked with HTML 4.1. An external CSS file that seemed to be ignored. Javascript problems as well. Other browsers fine.

Cause: Dynamically generated CSS and JS files. Server was reporting MIME type of text/html. HTML page was reporting MIME type of text/css for CSS files. Firefox had been told it was XHTML so was being anal-retentive.

Fix (for PHP): header('Content-type: text/css'); (or Javascript as appropriate). Remember that header() must be called before ANY html output is sent.
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
08-Nov-2007, 04:09 PM #2
Based on the fix, the problem you encountered related to PHP generated HTML pages, in the first place? Wouldn't it be considered "good practice" to have PHP send the proper content types along with the HTML content it's generating?

Peace...
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:57 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.