display: inline-table not implemented




Layout: Tables
18 years ago
3 years ago


(Reporter: Hixie (not reading bugmail), Assigned: dbaron)


(Blocks: 1 bug, {css2, dev-doc-complete, testcase})

css2, dev-doc-complete, testcase
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [awd:tbl] [Hixie-PF][reflow-refactor][patch], URL)


(3 attachments)



18 years ago
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.


18 years ago
Blocks: 18218


18 years ago
Assignee: troy → karnaze
Component: Layout → HTMLTables

Comment 1

18 years ago
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

18 years ago
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.


18 years ago
QA Contact: petersen → chrisd


18 years ago
Target Milestone: M14


18 years ago
Keywords: css2

Comment 3

18 years ago
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...


18 years ago
Target Milestone: M14 → M16


18 years ago
Summary: {css2} display: inline-table makes contents dissappear → display: inline-table makes contents dissappear

Comment 4

18 years ago
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

18 years ago
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.
Last Resolved: 18 years ago
Resolution: --- → REMIND
Summary: display: inline-table makes contents dissappear → display: inline-table not implemented

Comment 6

17 years ago
Reopening and moving to Future to keep this bug on our "potential dups" radar.
Keywords: correctness, testcase
OS: Windows 98 → All
Hardware: PC → All
Resolution: REMIND → ---
Target Milestone: M16 → Future

Comment 7

17 years ago
Taking QA per managerial policy.


17 years ago
QA Contact: chrisd → py8ieh=bugzilla

Comment 8

17 years ago
Taking QA per managerial policy.

Comment 9

17 years ago
*** Bug 58175 has been marked as a duplicate of this bug. ***


17 years ago

Comment 10

17 years ago
Ian, your testcase gives a 404. Could you attach the testcase to the bug.

Comment 11

17 years ago
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
damowmow.com or hixie.ch somewhere.

Comment 12

17 years ago
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

17 years ago
margin-left: auto; margin-right: auto;

Comment 14

17 years ago
*** Bug 68293 has been marked as a duplicate of this bug. ***

Comment 15

17 years ago
*** Bug 68293 has been marked as a duplicate of this bug. ***


17 years ago
QA Contact: ian → amar

Comment 16

17 years ago
*** Bug 48589 has been marked as a duplicate of this bug. ***


17 years ago
Whiteboard: [Hixie-PF]
*** Bug 82741 has been marked as a duplicate of this bug. ***

Comment 18

16 years ago
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

16 years ago
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?


16 years ago
Whiteboard: [Hixie-PF] → [awd:tbl] [Hixie-PF]

Comment 20

16 years ago
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

16 years ago
*** Bug 135994 has been marked as a duplicate of this bug. ***

Comment 22

16 years ago
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

16 years ago
Created attachment 78676 [details]
shows bugs in inline table display

here's the attachment I promised. ;)

Comment 24

16 years ago
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

16 years ago
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

15 years ago
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

15 years ago
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. http://www.w3.org/TR/2002/WD-CSS21-20020802/ The details for inline-block: http://www.w3.org/TR/2002/WD-CSS21-20020802/visuren.html#display-prop According to Bert Bos from w3.org, 'All in all, this should be the version of CSS that is "safe" for users of desktop browsers.'   

Comment 28

15 years ago
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.


15 years ago
Blocks: 184155

Comment 29

15 years ago
mass reassign to default owner
Assignee: karnaze → table
QA Contact: amar → madhur
Target Milestone: Future → ---


15 years ago
Target Milestone: --- → Future

Comment 30

14 years ago
I believe a similar situation is occurring with the web site at www.eawt.org.
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.


14 years ago

Comment 31

13 years ago
Created attachment 147925 [details]
block and inline tables

Block tables on left, inline tables on right.

Comment 32

13 years ago
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).
*** Bug 277057 has been marked as a duplicate of this bug. ***

Comment 34

11 years ago
*** Bug 342502 has been marked as a duplicate of this bug. ***


11 years ago
Blocks: 348577


11 years ago
Blocks: 361352


11 years ago
No longer blocks: 361352
Whiteboard: [awd:tbl] [Hixie-PF] → [awd:tbl] [Hixie-PF][reflow-refactor]

Comment 35

11 years ago
Patch in bug 9458.
Assignee: layout.tables → dbaron
Depends on: 9458
Whiteboard: [awd:tbl] [Hixie-PF][reflow-refactor] → [awd:tbl] [Hixie-PF][reflow-refactor][patch]


11 years ago
Depends on: 367332


11 years ago
Keywords: dev-doc-needed

Comment 36

11 years ago
Fixed by checkin of bug 9458 yesterday morning.
Last Resolved: 18 years ago11 years ago
Resolution: --- → FIXED
Depends on: 371249
This was documented a while ago.
Keywords: dev-doc-needed → dev-doc-complete
Depends on: 404030


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