Closed Bug 264136 Opened 20 years ago Closed 20 years ago

Height of table cell depends on font-size even if it doesn't contain text

Categories

(Core :: Layout: Tables, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 22274

People

(Reporter: arcolf, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910

With full standards mode the height of a table cell depends on the CSS property
font-size even if it doesn't contain text but only an image. In the page at
http://stud3.tuwien.ac.at/~e9725141/height.html both cells should have an height
of 3 pixels, but it doesn't work in the first example because the font-size is
missing. In the second example the font size is set to 1 pixel and the cell
height is correct.<br>
I think that height of the table cell is computed by the font size and if it is
missing the inherited value is used (you may try this by adding font-size: 1px
to the body element), altough the table cell doesn't contain text<br>
In quirks mode (delete the DOCTYPE from the HTML) the examples work fine. I have
also tested the page on IE6 and Opera 7.54 and the examples work fine on both of
them.

Reproducible: Always
Steps to Reproduce:
1. Open http://stud3.tuwien.ac.at/~e9725141/height.html


Actual Results:  
The first example has a wrong height and is much thicker than expected

Expected Results:  
Both blue lines should have a height of 3 pixels
in standars mode, IMG is inline.  to get what you want, IMG should be styled to
be block.

dupe of "[INLINE] Too much space (for descenders) under image elements"

*** This bug has been marked as a duplicate of 22274 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.