Closed
Bug 332171
Opened 18 years ago
Closed 8 years ago
Input type=button rendered incorrectly in HTML table when CSS property of "width: 100%;" is specified
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
FIXED
mozilla47
People
(Reporter: alan.garner, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 When an HTML INPUT tag of type=button is coded within a table cell, and given the CSS property of "width: 100%", it renders incorrectly. Especially when the table cell has no width attribute and other table cells do have width. The button object is squeezed out. Reproducible: Always Steps to Reproduce: 1. Try the following code: <html> <style> .buttons { width: 100%; } </style> <body> <table border=1 cellpadding=2 cellspacing=0 width=100%> <tr> <td width=100% align=left nowrap>This cell takes up most of the space</td> <td> <table> <tr> <td>|</td> <td><input type=button class=buttons value=Button></td> <td>|</td> </tr> </table> </td> </tr> </table> </body> </html> Actual Results: Button is squeezed out on the right side of the screen Expected Results: Removing the "width: 100%;" in the CSS style definition produces the expected result.
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
Comment 3•18 years ago
|
||
Confirmed with code provided by reporter.
Updated•18 years ago
|
Component: General → Layout: Tables
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → Trunk
Reporter | ||
Comment 5•18 years ago
|
||
If a table/cell does not specify a width then the width is not nothing. It is then up to the user agent to determine the best width to fit the content of the table cell. This is my interpretation of the W3C HTML standards. I would suggest that a CSS attribute of "width: 100%" would be ignored if no width is specified for the table cell. Please show the fully rendered button.
The MCW (MEW) of pct based frame is 0 so it can be squezzed as it is now.
Reporter | ||
Comment 7•18 years ago
|
||
The fact is that Internet Explorer, Mozilla, and the previous version of Firefox all render this button correctly. To maintain or increase Firefox's market-share bugs like this, which appear to be introduced accidentally, need to be fixed. This breaks existing code and decreases Firefox's compatibility with competing browsers.
I think my patches to bug 823483 will fix this (since they expand the quirk in one way (max-width too) and restrict it in another (fewer frame types); the latter is what matters here); just need to finish them (and figure out why the tests I wrote weren't all passing)...
Depends on: 823483
Flags: needinfo?(dbaron)
Comment 11•8 years ago
|
||
It does fix it. Tested with Firefox Nightly. bug 823483 fixes it.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
status-firefox45:
--- → affected
status-firefox46:
--- → fixed
status-firefox47:
--- → fixed
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•