Closed Bug 19956 Opened 25 years ago Closed 24 years ago

(see 22274) Extra space below image in cell

Categories

(Core :: Layout: Tables, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 22274

People

(Reporter: richard, Assigned: dbaron)

References

()

Details

(Keywords: testcase)

Attachments

(3 files)

In a three-row by one-cell table, the first and last rows containing an image
and the middle containing text, the first row is rendered with an extra
one-pixel buffer between it and the second row. The table is marked for
cellpadding, cellspacing, and border of 0, and the image (sized) is set for
vspace=0 border=0, to no avail.
Attached file XHTML testcase
Attached file HTML testcase
Whiteboard: [TESTCASE]
The XHTML testcase shows the bug; after removing the DOCTYPE it works fine, see
HTML testcase. (Using build 2000022916 on NT4.0 sp5)
Summary: Image in cell gets extra pixel below without cause → [WIP dcone]Image in cell gets extra pixel below without cause
Summary: [WIP dcone]Image in cell gets extra pixel below without cause → Image in cell gets extra pixel below without cause
I dumped the content models and they are the same between 3030 and 3029.
Assignee: karnaze → pierre
This may be correct, Pierre you should make sure.  The XHTML makes it run in
non-quirk mode... so the space that gets put into the table is a quirk relied
upon in a quirky Netscape Nav 4.x.  Peter Linss is the authority.
Status: NEW → ASSIGNED
Target Milestone: M15
Moving table bugs to M15 just to see how many we have.
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Block-moved to attinasi the bugs related to style inside tables
Assignee: pierre → attinasi
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
This looks like a table problem. The style is correct (as seen using DumpStyle): 
the padding is set to 0 on all of the cells, as it should be. 

Using the Visual Debugging menu item in Viewer I can see that the frame that 
contains the image is smaller than the table cell, and the difference is the gap 
this bug is complaining about.

The problem appears when the DTD is set to STRICT mode. In TRANSITIONAL mode 
there is no problem.

I am adding another testcase that is essentially the same as the previous ones, 
however it has a bgcolor set on the cells so it is easier to see that the 
padding is the problem (the color shows up when the DTD is set to STRICT). By 
changing the DTD from 'STRICT.dtd' to 'TRANSITIONAL.dtd' you can see the 
behavior change.
Assignee: attinasi → karnaze
Status: ASSIGNED → NEW
Whiteboard: [TESTCASE]
mass move to m16
Target Milestone: M15 → M16
Status: NEW → ASSIGNED
Target Milestone: M16 → M17
Testcase site: http://www.billericaybaptistchurch.freeserve.co.uk/. Look in a 
couple of hours - the site currently doesn't render due to an xml declaration 
that I'll remove shortly.

This uses the strict DTD and the table "surrounds" are padded to the size of a 
character (it seems). Take away the DOCTYPE and it renders fine. Another 
alternative is to assign a class to affected cells that sets the font-size to 
1px - that also works, backing up my "character size" guess.
Buster in the 3rd attachment (standard mode), the line inside the cell's block 
is 2 pixels taller than the image. 
Assignee: karnaze → buster
Status: ASSIGNED → NEW
I'm 90% sure this is a dup of 22274.
David, looks like this is a line height issue in standard mode.  Could you take 
a look?
Assignee: buster → dbaron
Depends on: 22274
This is correct according to (our interpretation of) the CSS2 inline box model.
 (The "interpretation" is that CSS2 10.8.1 says that 'line-height' on a block
specifies the minimum height of all of that block's line boxes.  It doesn't say
*how* it sets this minimum.  If it's just a direct setting of a minimum, it
leads to really strange things, like the problem described here happening for
small images but not for large ones.  If it sets the minimum by creating an
anonymous inline with the font/line-height of the block, things make much more
sense (this is our interpretation).)

*** This bug has been marked as a duplicate of 22274 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Verified duplicate.
Status: RESOLVED → VERIFIED
housekeeping
No longer depends on: 22274
Summary: Image in cell gets extra pixel below without cause → (see 22274) Extra space below image in cell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: