Closed Bug 132728 Opened 23 years ago Closed 22 years ago

(see 22274) gap below images in table cells (standard mode)

Categories

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

defect

Tracking

()

RESOLVED DUPLICATE of bug 22274

People

(Reporter: meshko, Assigned: karnaze)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.9) Gecko/20020314 BuildID: Netscape 6.2 windows, Mozilla 0.9.9 on FreeBSD Well, this looks like one of those vertical alignment issues you ask not to submit, but it really doesn't work as expected and I couldn't find a workaround. Basic HTML that demonstrates the problem: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>About ConServR</title> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td width="153"> <img height="45" src="index_files/redbar_left.gif" width="153" border="0"> </td> <td width="100%"> <img height="45" src="index_files/redbar_mid.gif" width="100%" border="0"> </td> <td width="179"> <img height="45" src="index_files/redbar_right.gif" width="179" border="0"> </td></tr> </tbody></table> </body></html> Reproducible: Always Steps to Reproduce: n/a Actual Results: doesn't display it properly Expected Results: display it properly
Confirming. For some reason the spaces before/after the images are affecting layout but doing so differently for the three images... making the images display:block or taking the spaces out solves the proble, but the page is in quirks mode so that should not be necessary.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I followed Boris's advice and removed the width field from image tags. You can see the result at http://www.conservr.com/ It is quite suprising (in Netscape 6.2 win32): if I click reload button while holding "shift" it renders incorrectly, if I click reload it renders fine. Hope this helps.
Confirming that the gap appears in the middle cell of the table. These gaps appears even if there are no spaces between <td> and <img> tags. Adding testcase keyword.
Keywords: testcase
Priority: -- → P3
Code stripped down to the bare bones, but white space still occurs where it should not. The table cell is still too large (vertically) for its contents, and valign appears to have no effect in moving the content around inside that space.
Regarding the above attachment (id=86915): the problem goes away when I remove the doctype from the page to force it into Quirks mode. In my case, the problem only appears in Standards Compliant mode.
Using XHTML Transitional doc type: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"&gt; causes similar error. Works fine in Netscape 4.78, but Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606 inserts 3 or 4 pixel gap under images. table code snippet: &lt;table border="5" cellpadding="0" cellspacing="0" frame="void" rules="none"&gt; &lt;tr&gt;&lt;td&gt;&lt;img src="images/nav/utop.gif" name="aboutus" id="aboutus" width="29" height="28" border="0" hspace="0" vspace="0" /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;img src="images/nav/bg.gif" width="29" height="15" border="0" hspace="0" vspace="0" /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; Always reproducable. RedHat 7.2; Ximian Gnome 1.4.1; XFree86 4.1.0
does the problem go away with img style="display:block" ? then this bug is a dupe of bug 22274
Yes, and more interestingly if I keep the xml declaration and the xhtml doctype declaration, but put a comment preceeding it then the bug also disappears. i.e. <!-- Moz 1.0 causes improper display when doc type included.--> <?xml version="1.0" encoding="UTF-8"?> <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> Anyway display:block fixes it.
img style="display:block" fixes it for me as well. So there we go, I guess.
I've just decided to check on the status of this bug and noticed that my Mozilla 1.2a 2002091014 running on w2k does not have this problem.
*** This bug has been marked as a duplicate of 22274 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Summary: vertical image alignment → (see 22274) gap below images in table cells (standard mode)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: