Open Bug 407813 Opened 18 years ago Updated 3 years ago

Table with right-padded elements does not resize

Categories

(Core :: Layout: Tables, defect)

defect

Tracking

()

People

(Reporter: ajs, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/20071115 Firefox/2.0.0.10 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/20071115 Firefox/2.0.0.10 In the example URL given (a very stripped down example of what I've run into in a larger page from http://wowstreet.ajs.com/ ) a table which contains two columns will not resize the second column to adapt to style-added right-justified padding when the first column is very wide, and has to be wrapped. In order to demonstrate the problem, the example page uses a gray background for the span inside the second column's cell. Reproducible: Always Steps to Reproduce: 1.Load the example page http://wowstreet.ajs.com/test2.html 2.Observe the gray area that extends outside of the table border 3. Actual Results: Padding extends past table boundary Expected Results: Padding should expand its cell I tried this under a Mac and Linux Firefox 2, and it happened in both places. Shockingly, it even happened under a VERY old Mozilla (probably 3-4 years old) that a friend had handy. Safari renders the table as expected. I'm categorizing this as "major" since it seems like a fairly core feature of table/CSS management, but I could be wrong about the severity. Note that what I do (inserting an image, right justified in the background of a span) is the exact same technique that Wikipedia uses for identifying "external links" on that site (actually it's the default style for all MediaWiki installs) and any time that shows up in a table like the on in my example, it will show similar results. Workaround: expand padding of the cell to compensate. Sadly, since there can be multiple such spans in a single cell, this is not a foolproof fix (and in my application I can have 1-3 such spans, so I'm out of luck unless I want to severely over-pad my cells).
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → 1.8 Branch
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
As it was pointed out in the original thread: http://groups.google.com/group/comp.infosystems.www.authoring.stylesheets/browse_frm/thread/b937078bb9a319b6 the problem is with margin/padding applied to an inline element within a table cell. Just change to say -moz-inline-box and the bug goes away. I am voting yes for this bug to fix. IMO it is one of things where it is not anymore important if its W3C-compliant or not. It just needs to be fixed a.s.a.p. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><title>Test table</title></head><body> <table style="border-width: 1px; border-style: outset"> <tr> <td>alaksdjf lasdkjf alsdjf laskjdf lakjsd flkasjdfalaksdjf lasdkjf alsdjf laskjdf lakjsd flkasjdfalaksdjf lasdkjf alsdjf laskjdf lakjsd flkasjdf alaksdjf lasdkjalaksdjf lasdkjf alsdjf laskjdf lakjsd flkasjdfalaksdjf lasdkjf alsdjf laskjdf lakjsd flkasjdf f alsdjf laskjdf lakjsd flkasjdf</td> <td style="text-align: right"> <div style="background-color: gray; padding-right: 50px; display:-moz-inline-box;"> foo </div> </td> </tr> </table> </body></html>
Attached file testcase
wfm, or what is the issue with this testcase?
(In reply to comment #3) > wfm, or what is the issue with this testcase? The "test case" is actually a workaround that shows that using display:-moz-inline-box correctly displays the content. The original test case is at the link that I provided.
Attached file testcase for the bug
the first testcase is the reference
Keywords: testcase
Version: 1.8 Branch → Trunk
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: