vertical-align top and bottom align element instead of its attached subtree

RESOLVED DUPLICATE of bug 118501

Status

()

Core
Layout: Block and Inline
RESOLVED DUPLICATE of bug 118501
14 years ago
13 years ago

People

(Reporter: Ingo Heinicke, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040608
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040608

A table cell has an image inside which is hyperlinked somewhere. The cell should
be vertically aligned top and the class of the cell AND the class of the
hyperlink are set to vertical-align:top by css. The hyperlinked image is shown
OUTSIDE the cell which should not be possible.

Better check example to get the idea...

Reproducible: Always
Steps to Reproduce:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Testcase</title>
<style type="text/css">
<!--
.problem   { vertical-align:top; }
.problem a { vertical-align:top; }
-->
</style>
<body>
<table class="contentblock" border="1">
<tr>
<td class="problem"><a href="#"><img
src="http://www.skyynet.de/gfx/skyynet.gif"></a></td>
<td>text</td>
</tr>
</table>

<table class="contentblock" border="1">
<tr>
<td class="problem"><a href="#"><img
src="http://www.skyynet.de/gfx/skyynet.gif"></a></td>
<td>text</td>
</tr>
</table>
</body>
</html>
Actual Results:  
Images shown ABOVE the cell they're in

Expected Results:  
Images should be shown inside the cell aligned top to cells top.

Also reproduced in Firefox 0.8.
Works fine in IE6, Opera7.5
Maybe the same bug as bug 149934?
(Reporter)

Comment 2

14 years ago
Created attachment 151137 [details]
Testcase for bug
(Reporter)

Comment 3

14 years ago
Bug 149934 indeed seems similar to this
It's not exactly a duplicate -- but this one was actually a bug in the CSS2 spec
until one of the most recent drafts of CSS2.1.
Assignee: dbaron → nobody
Status: UNCONFIRMED → NEW
Component: Style System (CSS) → Layout: Block and Inline
Ever confirmed: true
QA Contact: ian → core.layout.block-and-inline
Summary: CSS vertical-align of cell and hyperlinked image inside causes image shown outside → vertical-align top and bottom align element instead of its attached subtree

Comment 5

14 years ago
Created attachment 159790 [details]
Alternate testcase for similar bug, probably related.

This test case shows an attempt to make two simple tables top-align with each
other and with a preceding bit of text.  The * { border: ... } style causes
each layout box to be bordered; it is easy to see that each of the tables has a
spurious box surrounding the final line.  This box is in fact the table box (a
fact easily confirmed using the Firefox DOM browser).  Since the table box
doesn't contain the table contents, it's not surprising that alignment is
wrong.

The only browser I've found that gets it 100% right is (ugh) IE5, although
Opera and Konqueror at least render the content correctly while ignoring
display: inline.
Comment on attachment 159790 [details]
Alternate testcase for similar bug, probably related.

not related
Attachment #159790 - Attachment is obsolete: true
Comment on attachment 159790 [details]
Alternate testcase for similar bug, probably related.

Not only is it not related, but I highly doubt your notion of "100% right" is
anywhere close to right.  Note that this testcase does trigger bug 135994.

Comment 8

13 years ago
Isn't this is a duplicate of bug 118501? I have no clue what a "loose subtree" 
is.

*** This bug has been marked as a duplicate of 118501 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.