Closed Bug 95268 Opened 24 years ago Closed 24 years ago

Empty textboxes in td with colspan > 1 and white-space:nowrap rendered incorrectly

Categories

(Core :: Layout: Tables, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: mluty, Assigned: alexsavulov)

References

Details

(Keywords: testcase)

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.3) Gecko/20010801 BuildID: 2001080110 I have a case where I have a table that contains multiple text boxes. Each TD can have multiple text boxes with their widths set to a certain percentage. The TD also has the style white-space: nowrap so that that all textboxes in that cell are on the same line. Mozilla has a problem rendering the textboxes correctly, as it appears the empty boxes are only a couple of pixels wide. After typing into one of the boxes, they expand to the correct size. The following is sample code that reproduces the problem: <html><head><title></title> </head> <body> <table style="width:96%"> <col style="width:20%"/><col style="width:80%"/> <tr> <td><input type="text"/></td> <td><input type="text"/></td> </tr> <tr> <td colspan="2" style="white-space:nowrap"> <input type="text" style="width:49%"/> <input type="text" style="width:49%"/> </td> </tr> </table> </body> </html> Reproducible: Always Steps to Reproduce: 1.Load the example html in the browser. 2. 3. Actual Results: The text boxes are rendered with a width of a few pixels. Expected Results: The text boxes should have a width of the percentage of the cell they are in. Type into one of the text boxes and they will resize to the correct size.
This bug may be invalid. The CSS2 spec says that "width" does not apply to, among other things, non-replaced inline elements. AFAIK, textboxes are considered non-replaced (replaced elements involve loading an image or other content with intrinsic dimensions). So, I don't think you can set percentage widths on input elements.
The following is the definition found in the CSS2 document: Replaced element An element for which the CSS formatter knows only the intrinsic dimensions. In HTML, IMG, INPUT, TEXTAREA, SELECT, and OBJECT elements can be examples of replaced elements. For example, the content of the IMG element is often replaced by the image that the "src" attribute designates. CSS does not define how the intrinsic dimensions are found. According to this definition, the INPUT tag is a replaced element.
Attached file Testcase
Percentage widths does not work inside NOWRAP colspan cell.
Assignee: karnaze → alexsavulov
Status: UNCONFIRMED → NEW
Component: Layout → HTMLTables
Ever confirmed: true
Keywords: testcase
QA Contact: petersen → amar
Depends on: 45621
WORKSFORME, build 2001-10-10-03 (trunk) on Windows 98 SE.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
works fine build: 2002010703(trunk) platform: WIN2K
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: