CSS length values set to 0 are stored as 0pt.

RESOLVED DUPLICATE of bug 393910

Status

()

RESOLVED DUPLICATE of bug 393910
9 years ago
9 years ago

People

(Reporter: william.dinoia, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

Setting a CSS style property's value to 0, actually sets the value to 0pt. According to the W3C; After a zero length, the unit identifier is optional.
Internet Explorer, Chrome, and Opera all set the value to 0px.

Reproducible: Always

Steps to Reproduce:
1. copy and paste the following URL...
2. javascript: var div = document.createElement('div'); div.style.width = 0; window.alert(div.style.width);
3. press return
Actual Results:  
0pt

Expected Results:  
0 || 0px

Updated

9 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 393910
You need to log in before you can comment on or make changes to this bug.