php as external css invalid in xhtml doctype

RESOLVED DUPLICATE of bug 123674

Status

()

Core
CSS Parsing and Computation
--
major
RESOLVED DUPLICATE of bug 123674
15 years ago
15 years ago

People

(Reporter: x jeremy jarratt, Assigned: harishd)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4b) Gecko/20030507
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4b) Gecko/20030507

an external stylesheet written in PHP, and with a PHP extension, does not work
when the doctype is any variant of xhtml. these stylesheets seem to be
completely ignored.

Reproducible: Always

Steps to Reproduce:
1. make a dynamic stylesheet in PHP, with a .php extension
2. link to the external stylesheet using either LINK or @import
3. use doctype xhtml (any variant)

Actual Results:  
stylesheets are fnorded and ignored.

Expected Results:  
Mozilla should have displayed the page WITH the styles specified

this appears to also happen in Firebird and other versions of Mozilla and Netscape.

Comment 1

15 years ago
jeremy, is it a CSS stylesheet, and is it being served with the correct text/css
MIME type?

Comment 2

15 years ago
In standards compliance mode (from the doctype), CSS files must have a MIME type
of text/css.  Othererwise they are ignored (and a message is written to the
Tools, Web Development, JavaScript Console window)

*** This bug has been marked as a duplicate of 123674 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Component: Parser → Style System
QA Contact: dsirnapalli → ian
Resolution: --- → DUPLICATE
(Reporter)

Comment 3

15 years ago
thanks...
i put the following at the top of my php css files:
header("content-type:text/css"); 

but, owing to the fact that i am a certified idiot, i didn't wrap it in php
delimiters ("<?" and "?>" for those just joining us). D'OH!! it does appear to
work now. thanks again, and sorry for duplicating!
You need to log in before you can comment on or make changes to this bug.