Closed Bug 827113 Opened 13 years ago Closed 13 years ago

CSS display:inline can cause table border to render incorrectly

Categories

(Core :: Layout: Tables, defect)

17 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mgregory22, Unassigned)

Details

Attachments

(1 file)

Attached image border-error.png
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0 Build ID: 20121128204232 Steps to reproduce: <html> <head> <style> table { display:inline; } th, td { border: solid 1px silver; padding: 10px; } .r { border: solid 1px red; } </style> </head> <body> <table class="i r"> <tr><th>1</th></tr> <tr><td>&nbsp;</td></tr> </table> </body> </html> Actual results: The outside table border is rendered too small and in a weird position. Expected results: The table should have a red border around it. Removing the "display:inline" property gives me what I expect.
Component: Untriaged → Layout: Tables
Product: Firefox → Core
I also get this on Mac OS X (Firefox 17.0.1)
OS: Windows XP → All
Hardware: x86 → All
OS: All → Windows XP
Hardware: All → x86
The rendering seems correct for display:inline (Opera renders it the same). Did you mean display:inline-table perhaps?
Sorry, my mistake. I guess I'm just not understanding the CSS rules in this situation. Chrome and Safari render the above with the border encompassing the cells, so I thought that was correct.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
(In reply to Matt Gregory from comment #3) > Chrome and Safari render the above with the border encompassing > the cells, so I thought that was correct. Webkit seems to have a quirk for this - if you add <!DOCTYPE HTML> to the test to get Standards Mode rendering you'll get a different result. https://bugs.webkit.org/show_bug.cgi?id=21092 (fwiw, IE10 also renders it like Firefox/Opera)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: