Closed
Bug 125901
Opened 23 years ago
Closed 23 years ago
Cell Height not correctly defaulting/displaying
Categories
(Core :: Layout: Tables, defect)
Tracking
()
People
(Reporter: registrant, Assigned: karnaze)
References
()
Details
Greetings...
I'm having trouble getting the cell height of a table to correctly default to
the height of an image, or it is not collapsing to the height defined in the CSS
or HTML attribute.
I'm coding to the 4.01 Strict DTD. The code follows:
<pre>
<table class="mainTable" border="0" cellspacing="0" cellpadding="0" width="100%">
<colgroup span="3">
<col width="305">
<col width="305">
<col width="170">
</colgroup>
<tr>
<td class="mainHeader" colspan="3"><img src="images/header.jpg" alt="" width="780"
height="72"></td>
</tr>
</pre>
The CSS is defined as follows:
<pre>
.mainHeader {
background-image: url(../images/headerBg.jpg);
background-repeat: repeat-x;
background-position: center top;
}
</pre>
I have a picture at http://www.petmystone.com/moDebug/mozillaDebug.html
Note the *white space" above the text descenders. The image is aligned top. The
cell holding the main part of the text is a image. It has some extra whitespace
at the bottom. I have tried a number of fixes... in the HTML and the CSS. Can't
seem to get it to fix.
Note... Netscape 6.2.1 (mozilla 0.9.4) does not have this problem, nor does MSIE
5.1.3 (Mac OS X). Screen shots included on page.
Any ideas? Something I missed in the new features of Mozilla?
added link to bug for screen shots
Comment 2•23 years ago
|
||
I believe this is a duplicate of bug 22274.
Tim, please read
http://developer.netscape.com/evangelism/docs/articles/img-table/ for an
explanation. In short, the extra space below the image is for the inline text
descenders (since img is by default an inline element like any other.) Add
display:block; or vertical-align:bottom; to the img to remove the extra space.
The reason you didn't see this in 0.9.4 but do see it now is most likely due to
changes in the way DOCTYPEs are parsed since that milestone. It appears that
the DOCTYPE you're using is not a common one (I'm guessing, based off the one in
your screenshot page); 0.9.4 would make an unknown DOCTYPE trigger quirks mode
whereas newer builds will trigger strict standards mode.
Of course, that's conjecture on my part, since you didn't provide the full HTML
file or the actual DOCTYPE being used. I'm marking this bug a dupe of bug
22274; please reopen (and provide the full HTML source) if you disagree.
*** This bug has been marked as a duplicate of 22274 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Just a thank you! Indeed it was a duplicate as described. I looked in the
archives for a similar problem, but missed the cited bug. Thanks again!
You need to log in
before you can comment on or make changes to this bug.
Description
•