Closed Bug 365724 Opened 19 years ago Closed 19 years ago

style sheets with div ID set as single number do not qork

Categories

(Core :: CSS Parsing and Computation, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: gc28, Assigned: dbaron)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 If style sheet div ids are single numbers, they will not behave properly. The buggy.html URL included demonstrates this. buggy.html has two style sheets with IDs 1 and 2. 1 is set to visible and absolute position, 2 is hidden and also set to absolute position. It seems that neither of these divs are showing these properties; both are visible and have no position. The URL http://web.njit.edu/~gc28/test/normal.html is essentially the same code as buggy.html except I have renamed the divs from 1 and 2 to a1 and a2, and the page works fine. Reproducible: Always Steps to Reproduce: 1. Make a page with style sheets and name the style sheets with single number names (e.g. <div id="1">). 2. Assign properties to each sheet such as position: absolute etc. 3. Open the page in a browser. Actual Results: witness that the attributes assigned to the style sheets are not realized in the browser Expected Results: the style sheets should display the attributes assigned to them. Look here: http://web.njit.edu/~gc28/test/buggy.html Now look here: http://web.njit.edu/~gc28/test/normal.html
Version: unspecified → 2.0 Branch
I don't think IDs can begin with a digit. According to http://www.w3.org/TR/REC-xml/#NT-Name, only a letter, an underscore or ':' are allowed. Refs : - http://www.w3.org/TR/REC-xml/#sec-attribute-types - http://www.w3.org/TR/REC-CSS2/selector.html -> Core/CSS -> INVALID ?
Assignee: nobody → dbaron
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → ian
Version: 2.0 Branch → 1.8 Branch
Invalid. In CSS, an ID cannot start with a digit: http://www.w3.org/TR/CSS21/syndata.html#q6 See also html 4.01: http://www.w3.org/TR/html401/types.html 'ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").'
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.