Last Comment Bug 18217 - display: inline-table not implemented
: display: inline-table not implemented
[awd:tbl] [Hixie-PF][reflow-refactor]...
: css2, dev-doc-complete, testcase
Product: Core
Classification: Components
Component: Layout: Tables (show other bugs)
: Trunk
: All All
P3 normal with 25 votes (vote)
: Future
Assigned To: David Baron :dbaron: ⌚️UTC-8
: Hixie (not reading bugmail)
: 48589 58175 68293 82741 277057 342502 (view as bug list)
Depends on: inline-block 367332 371249 404030
Blocks: 184155 18218 348577
  Show dependency treegraph
Reported: 1999-11-07 22:11 PST by Hixie (not reading bugmail)
Modified: 2014-04-26 03:08 PDT (History)
41 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Testcase (950 bytes, text/html)
2002-03-17 09:52 PST, Nicolás Lichtmaier
no flags Details
shows bugs in inline table display (853 bytes, text/html)
2002-04-10 21:40 PDT, James F. Cerra
no flags Details
block and inline tables (723 bytes, image/png)
2004-05-07 13:46 PDT, XFox
no flags Details

Description User image Hixie (not reading bugmail) 1999-11-07 22:11:28 PST
Currently, inline-table causes the text to dissappear altogether. See:

The test contains a paragraph like this:

    <p>This is a quite short paragraph. There follows a table... Right
    here: <span class="table"> <span class="row"> <span class="cell">
    There is an inline table here.</span></span></span> This is after
    the table. The table should have appeared inline.</p>

It uses the following styles:

    span.table { display: inline-table; width: 5em; border: solid; }
    span.row { display: table-row; }
    span.cell { display: table-cell; }

The page renders as follows:

   This is a quite short paragraph. There follows a table... Right here: This
   is after the table. The table should have appeared inline.

i.e., the table does not render. Making the span.table element "display:table"
makes it all render ok.
Comment 1 User image David Baron :dbaron: ⌚️UTC-8 1999-11-11 12:36:59 PST
I would think an 'inline-table' would act like an inline replaced element, but
this isn't completely clear from the spec.  Should it instead have a baseline?
If so, where?
Comment 2 User image Hixie (not reading bugmail) 1999-11-11 15:27:59 PST
I think the closest the spec gets to helping us is:

# inline-table (In HTML: TABLE)
#     Specifies that an element defines an inline-level table: it is a
#     rectangular block that participates in an inline formatting context).

Personally, I would say render it like an inline-block -- unfortunately, the
CSS3 UI spec is just as vague as CSS2's inline-table definition on this issue!
David, I suggest one of us posts about this to www-style.

In the meantime, however, I think we should assume that inline-table is just
a replaced element as far as the line formatting model rules are concerned.
Comment 3 User image Hixie (not reading bugmail) 2000-01-13 16:06:59 PST
Migrating from {css2} to css2 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
Comment 4 User image Pierre Saslawsky 2000-03-25 13:31:18 PST
IMPORTANT: Like 'compact', 'run-in' and 'marker', a declaration containing 
'display:inline-table' is now entirely ignored by the CSS parser. See bug 18218 
and bug 15432 for more info.

If you are planning to implement 'inline-table', you will have to re-enable the 
declaration in nsCSSParser.cpp. If you have no plans to implement it for this 
release, you may want to mark the bug "Later" like the other ones.
Comment 5 User image karnaze (gone) 2000-05-07 16:10:46 PDT
I'm chaning the summary from "display: inline-table makes contents dissappear" 
to "display: inline-table not implemented and marking "remind". The contents are 
not disappearing for the reasons Pierre mentions.
Comment 6 User image Hixie (not reading bugmail) 2000-09-07 00:26:28 PDT
Reopening and moving to Future to keep this bug on our "potential dups" radar.
Comment 7 User image Hixie (not reading bugmail) 2000-10-01 16:47:25 PDT
Taking QA per managerial policy.
Comment 8 User image Hixie (not reading bugmail) 2000-10-01 16:58:03 PDT
Taking QA per managerial policy.
Comment 9 User image Hixie (not reading bugmail) 2000-10-27 00:28:03 PDT
*** Bug 58175 has been marked as a duplicate of this bug. ***
Comment 10 User image Bernd 2000-12-29 06:30:16 PST
Ian, your testcase gives a 404. Could you attach the testcase to the bug.
Comment 11 User image Hixie (not reading bugmail) 2000-12-29 06:35:02 PST
It's temporary, the university is upgrading their UPS or something...
If you need the testcase Right Now give me a yell and I'll throw it up on or somewhere.
Comment 12 User image David Woolley 2001-02-21 10:34:58 PST
As far as I can tell, there is no way of imitating <table align="center"> in 
CSS2/HTML 4 strict, without using display: inline-table on the table element, 
as table is treated as a block element and there appears no way to centre block 
elements other than by setting percentage widths and margins.  See: 
Comment 13 User image David Baron :dbaron: ⌚️UTC-8 2001-02-21 11:51:41 PST
margin-left: auto; margin-right: auto;
Comment 14 User image Chris Petersen 2001-02-27 17:20:52 PST
*** Bug 68293 has been marked as a duplicate of this bug. ***
Comment 15 User image Chris Petersen 2001-02-27 17:21:10 PST
*** Bug 68293 has been marked as a duplicate of this bug. ***
Comment 16 User image Christian Mattar 2001-04-19 04:45:30 PDT
*** Bug 48589 has been marked as a duplicate of this bug. ***
Comment 17 User image Andreas M. "Clarence" Schneider 2001-05-25 11:47:14 PDT
*** Bug 82741 has been marked as a duplicate of this bug. ***
Comment 18 User image Bernd 2001-08-12 00:04:29 PDT
May be I am bugblind, but the table in Hixies testcase appears for me inline,
the same is true for bug 48589. Hixie, could you reevaluate the status of the
bug, please !!
Comment 19 User image Hixie (not reading bugmail) 2001-08-13 19:21:04 PDT
That's weird. It appears we do something with 'inline-table' now, but LXR shows
that the CSS parser drops 'display: inline-table' on the floor. Very strange.

Amar: Could you investigate?
Comment 20 User image Nicolás Lichtmaier 2002-03-17 09:52:41 PST
Created attachment 74623 [details]

The old testcase had a problem IMO, you can't see if there's a rable there
because the border will be aplied to the inline box. I've turned it into a 2x2
table. And.. it seems it works, but it does a strange thing with the border. It
only shows a border around the lower row.
Comment 21 User image Amarendra Hanumanula 2002-04-09 17:50:38 PDT
*** Bug 135994 has been marked as a duplicate of this bug. ***
Comment 22 User image James F. Cerra 2002-04-10 21:38:55 PDT
I didn't notice, but the bug I filed, Bug 135994, was marked as a duplicate of 
this one.  Whether or not they are duplicates is debatable; however they are 

I think that the problem is with the way Mozilla "sees" the table element.  
When it is declared to be {display: inline-table} or {display: inline;}, the 
table element becomes just another inline element like [span].  However, since 
the affected table tag is no longer considered to be a "table element" 
according to Mozilla, then there is a HTML bug.

That bug is the fact that the [tr] and [td] (and other) elements must be 
inside a [table] element (according to the HTML4 specs).  Since Mozilla no 
longer considers the ***affected table element*** to technically be an 
***actual table element*** (due to the CSS display property change from table 
to inline), then the rendering engine thinks that this is a bug in the code 
and tries to guess the intent of the author.

This theory is supported by my testcase from Bug 135994.  I made the table 
have a border, and it was displayed as if affected table element was a regular 
inline element.  The table's contents were rendered, but they are not related 
to the affected table element, except for a few bugs:  For instance, if the 
table is positioned relative to it's inline-position, then strange things 
happen to the table elements.  (see the testcase)
I don't know if this is a bug or a feature, though.  According to the markup 
(and HTML4 specs), any table element, even with {display: inline;}, is still a 
valid table, no matter what Mozilla may think.  The CSS1 specs (which I was 
coding to) don't mention if changing the display property of tables changes 
what they can hold.  The CSS2 specs utilize the {display: inline-table;} 
property and don't explain what {display: inline;} does to a table element and 
its contents (I think).

I will attach a file with my test case (using {display: inline;} instead of 
{display: inline-table;}, thought I think they should both show the same 
Comment 23 User image James F. Cerra 2002-04-10 21:40:54 PDT
Created attachment 78676 [details]
shows bugs in inline table display

here's the attachment I promised. ;)
Comment 24 User image James F. Cerra 2002-04-10 21:45:31 PDT
I forgot something (sorry):
>>It only shows a border around the lower row.<<

I think that Mozilla is showing the border around the table element as if it 
was an inline element.  I don't think that the border is around the bottom row 
of the table (see the intersection of the border and the text in the bottom 
Comment 25 User image David Baron :dbaron: ⌚️UTC-8 2002-04-10 21:58:44 PDT
Those aren't bugs in 'inline-table', since 'display: inline' and 'display:
inline-table' are two very different things.  I'm going to reopen bug 135994,
since it is NOT related at all to this bug.
Comment 26 User image David Baron :dbaron: ⌚️UTC-8 2002-05-09 22:12:18 PDT
I think the appearance of support for 'inline-table' comes from the failure to
do {ib} construction when we construct the anonymous table frame.  I don't think
there's anything deeper than that.  'inline-table' has since been renamed to
'-moz-inline-table'.  However, I think there's something else stopping it from
getting through, since I don't see how the logic in ConstructFrameByDisplayType
would have allowed any frames at all to be constructed.
Comment 27 User image Jos.vandenOever 2002-08-13 02:02:13 PDT
CSS 2.1 has been released. This is the revised edition of CSS2. It adds a few small things from CSS3. One of these is display: inline-block. The details for inline-block: According to Bert Bos from, 'All in all, this should be the version of CSS that is "safe" for users of desktop browsers.'   
Comment 28 User image steve.swanson 2002-10-04 12:58:47 PDT
MathML note: <mtable> is an inline-table.  I believe that if the MathML 
implementation were able to reuse an inline-table object (instead of table), a 
number of bugs (Bug 130889, others) would go away.
Comment 29 User image karnaze (gone) 2003-03-31 11:26:12 PST
mass reassign to default owner
Comment 30 User image John Meola 2003-10-25 08:09:25 PDT
I believe a similar situation is occurring with the web site at
When you click on one of the links on the left side of the page, nothing is
displayed inside the window on the page where new data are supposed to be. The
bad code, I suspect, is <iframe name="I1" height="100%" width="100%" border="0"
frameborder="0" src="../xxxxxxx.asp">. The data load perfectly in IE 6. Also,
the page was created using Front Page 5.
Comment 31 User image XFox 2004-05-07 13:46:00 PDT
Created attachment 147925 [details]
block and inline tables

Block tables on left, inline tables on right.
Comment 32 User image Bruce Miller 2004-07-28 13:13:34 PDT
The CSS2.1 spec says that the baseline of an inline-table should be
the baseline of the first row. (See 2nd to last paragraph on
That doesn't seem to be respected in Firefox 0.9.1 (linux).
Comment 33 User image Henri Sivonen (:hsivonen) 2005-01-04 15:03:29 PST
*** Bug 277057 has been marked as a duplicate of this bug. ***
Comment 34 User image Andrew Schultz 2006-06-23 10:38:13 PDT
*** Bug 342502 has been marked as a duplicate of this bug. ***
Comment 35 User image David Baron :dbaron: ⌚️UTC-8 2006-12-11 15:02:34 PST
Patch in bug 9458.
Comment 36 User image David Baron :dbaron: ⌚️UTC-8 2007-01-28 19:16:54 PST
Fixed by checkin of bug 9458 yesterday morning.
Comment 37 User image Eric Shepherd [:sheppy] 2007-09-25 09:41:47 PDT
This was documented a while ago.

Note You need to log in before you can comment on or make changes to this bug.