Closed
Bug 409267
Opened 17 years ago
Closed 13 years ago
getComputedStyle() width property broken for table element, always returns width of parent
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jleech, Unassigned)
Details
Attachments
(1 file)
641 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2 See example below. <html> <body> <div style="width:400px"> <table style="width:200px; border:2px solid black"> <thead> <tr> <td>One</td> <td>Two</td> <td>Three</td> </tr> </thead> <tbody> <tr> <td>One</td> <td>Two</td> <td>Three</td> </tr> </tbody> </table> </div> </body> <script> alert(getComputedStyle(document.getElementsByTagName("table")[0],'').getPropertyValue('width')); </script> </html> Reproducible: Always Steps to Reproduce: 1. View the example in a browser Actual Results: 400 px Expected Results: 200 px This worked in previous Firefox versions. Doesn't matter if the table width is auto, a specific pixel width, a percentage, etc.
Comment 1•17 years ago
|
||
Could you upload the testcase using "Add an attachment", thanks.
Reporter | ||
Comment 2•17 years ago
|
||
QA Contact: general → style-system
Comment 3•13 years ago
|
||
The testcase alerts "196px" for me, which looks correct. Presumably fixed when we started using the inner table for a bunch of the computed style stuff...
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•