Javascript drops support for style.left in xhtml strict doctype.

RESOLVED INVALID

Status

()

Firefox
General
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: Bryan, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051025 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051025 Firefox/1.5

If I use a doctype, everything appears fine, but if I declare an xhtml strict doctype, I receive the following error:
Error: Error in parsing value for property 'left'.  Declaration dropped.

This only happens with the javascript method of assigning.  The CSS assignment of left: still works.

Example:
document.getElementById(ThisMenu).style.left = 150;

Reproducible: Always

Comment 1

13 years ago
left = 150 is invalid.  You need to specify a length, a percentage, auto, or inherit.  Assuming a length, it needs a unit immediately following, i.e. 150px or 150mm.  See http://www.w3.org/TR/CSS21/syndata.html#value-def-length

In standards-compliance mode (triggered by the doctype) the ambiguous value is dropped. ->invalid
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.