Closed Bug 288599 Opened 20 years ago Closed 20 years ago

Firefox fails to obey CSS ID if ID is numerical

Categories

(Firefox :: General, defect)

defect
Not set
major

Tracking

()

VERIFIED INVALID

People

(Reporter: simontsang, Assigned: bugzilla)

Details

User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2 Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2 Firefox refuses to accept numerical css id. In the other hand, when a style is defined with a CSS (either external or internal), element which has an numerical id assigned to it will be ignored by Firefox. For example, a#001 {color: black} will be ignored whereas a#hello1 {color: black} works properly. Reproducible: Always Steps to Reproduce: 1.Create an html using CSS 2.Assign numerical id to element 3. Actual Results: styles assigned under the numerical id are ignored. Expected Results: styled assigned under numerical id should not be ignored. <html> <head> <style type="text/css"> a#idnum {color: #FF0000} a#001 {color: #000000} a#002 {color: #F0F0F0} </style> </head> <body> <p><a id="idnum" href="link.html">A link</a></p> <p><a id="001" href="link.html">A link</a></p> <p><a id="002" href="link.html">A link</a></p> </body> </html>
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
<quote> In CSS 2.1, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit. </quote>
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.