Closed Bug 464872 Opened 16 years ago Closed 14 years ago

css table-cell problem

Categories

(Core :: Layout: Block and Inline, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bugzilla33, Unassigned)

References

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1) Gecko/20081007 Firefox/3.1b1

css table-cell problem

Reproducible: Always

Steps to Reproduce:
open attachment
Actual Results:  
contents in second cell bottom positioned, red border

Expected Results:  
contents in second cell top positioned, no red border
Attached file source
With Firefox 3 I see the same picture as with latest trunk, only the red part on the bottom is bigger. With Firefox 2 the picture is quite different; a small red line on the bottom and an bigger stripe on top. And the Firefox 2-layout is the desired one?
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → Trunk
WebKit (latest nightly) and Safari 3.2 have the same display as Gecko 1.9 (Fx 3.0.x and Minefield).
 
Opera (9.6) is different: the contents of the second cell is at the top, there is no red to be seen.

Also, if some inline content is added inside the blue div (just a character, generating a line-box), then Gecko 1.9, WebKit and Opera have the same display: no red, content of second cell is at the top.

I think that Gecko 1.9.x and WebKit are doing it correctly per CSS2.1 17.5.3.
Yep.  Specifically this part of 17.5.3:

  The baseline of a cell is the baseline of the first in-flow line box in the
  cell, or the first in-flow table-row in the cell, whichever comes first. If
  there is no such line box or table-row, the baseline is the bottom of content
  edge of the cell box.

In this case there is no line box inside the blue div, so the baseline is the bottom of the content edge, which is the bottom of the blue div.  This gets lined up with the baseline of the 'a', and the rest is history.
Then again, the CSS spec doesn't exactly define when line boxes are or are not present....  I posted http://lists.w3.org/Archives/Public/www-style/2010May/0698.html about that.
But that would be a block issue anyway, not a tables issue.  And I think an empty block should in fact have no lineboxes, so the attached testcase's rendering is correct as far as it goes.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Component: Layout: Tables → Layout: Block and Inline
QA Contact: layout.tables → layout.block-and-inline
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: