DOCTYPE causes CSS styles to break

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
RESOLVED INVALID
16 years ago
16 years ago

People

(Reporter: Ted Burger, Assigned: dbaron)

Tracking

Trunk
PowerPC
Mac System 9.x
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

16 years ago
I have the following snippets placed correctly on a page:
----my comments----

==============
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
----at the very top of the page----


<link href="style.css" rel="stylesheet" type="text/css">
----inside the HEAD tags----

<TH COLSPAN="2" ALIGN="left" class="general">The contents of your shopping cart
is listed below.</TH>
----inside a working table----
==============

The CSS styles do not get applied to the page UNLESS I remove the DOCTYPE line.

As soon as I remove the DOCTYPE line from the page the style sheets start working.

Two identical pages except that one has a DOCTYPE and the other does not.
http://www.tobsupport.com/digitalsoup/csstest1.mgi
http://www.tobsupport.com/digitalsoup/csstest2.mgi
The stylesheet in question is being served as "text/html", and we don't
understand the "text/html" stylesheet language.  (Newer builds would have a
warning on the error console about this.)  You should make the server serve the
stylesheet as text/css.

See also http://mozilla.org/docs/web-developer/quirks/
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.