CSS and javascript controled css behaves diferently in XHTML

VERIFIED INVALID

Status

()

Core
DOM: CSS Object Model
--
major
VERIFIED INVALID
15 years ago
15 years ago

People

(Reporter: Martin Novak, Assigned: jst)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020721
BuildID:    20020720104

CSS and javascript controled css behaves diferently in XHTML. I specify XHTML 1
transitional (same in strict) DOCTYPE. I use properies from css2 - position:
absolute; left: 120;... - this in css file. But this works even mozilla is
telling me that DOM is in css1 compatibility mode. In javascript I cannot change
these properties what is be me right(as mozilla reports in document.compatMode).
I think that behaviour of style sheets specified in document and javascript dom
should be the same.

Reproducible: Always
Steps to Reproduce:
1. specify doctype XHTML, then create eg. div element and by stylesheet specify
absolute position somewhere in document. It works - it's maybe badly.
2. Then somehow change the position - doesn't work - it's right.
3. 

Expected Results:  CSS 2 shouldn't work in XHTML trans/strict standard mode.
Invalid. "CSS1Compat" merely means "Not violating CSS1".  It does not mean "Not
supporting CSS2".  So we correctly apply all the _valid_ styles.

Now your script is setting styles to invalid values.  For example, it sets:

  tt.style.left = 100;

when "counter" is "100".  But "100" is not a valid value of "left"; "100px"
would be.  So we ignore the invalid value.

See http://www.mozilla.org/docs/web-developer/quirks/ for an explanation of
Mozilla's rendering modes and how these are determined based on doctype. 
"CSS1Compat" corresponds to either Standards or Almost Standards rendering mode
(the string "CSS1Compat" was chosen for IE compatibility; see
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/compatmode.asp
for IE's documentation and
http://www.mozilla.org/docs/dom/domref/dom_doc_ref11.html for the Mozilla
documentation).
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.