[Webkit-unassigned] [Bug 31397] New: Incorrect <a> tag causes layout confusion.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 12 02:25:28 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31397
Summary: Incorrect <a> tag causes layout confusion.
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
URL: http://fedex.com/cn/contact/
OS/Version: Windows XP
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: hanrui.gao at gmail.com
CC: johnnyding.webkit at gmail.com, hongxu at google.com
Created an attachment (id=43048)
--> (https://bugs.webkit.org/attachment.cgi?id=43048)
Screenshot for your reference.
Other browsers tested:
Safari 4: Fail
Firefox 3.x: Fail
IE 6/7/8: OK (In IE8, the page runs in IE7 standards mode by page default)
What steps will reproduce the problem?
1. Load http://fedex.com/cn/contact/
What is the expected result?
"客户服务" should on the right side of the purple arrow icon and there should be
one entry of "写信给FedEx" below that.
What happens instead?
"写信给FedEx" and "客户服务" is below the purple arrow icon.
Console Output:
<a> misnested or not properly closed. Cloning <a> in order to preserve the
styles applied by it.
Please provide any additional information below. Attach a screenshot if
possible.
The problem is HTML tags write error.
This page has a tag:
<a name="top" />
This is wrong way to write, element "<a>" is not an empty tag, can not be
written like this.
The correct way is:
<a name="top"></a>
Just as the console output says, browsers cloned the unclosed tag in order to
preserve the styles applied by it.
But different browsers have their different ways to make that.
In non-IE, they clone the <a> tag into many <a> tags and insert each of them
into every block elements.
But in IE, the <a> is containing all contents before another <a> tag which has
id="i1" (the <a> tag of "客户服务").
That's why page layout confusion.
In IE8, the page by default runs in IE 7 standards mode, and when switching to
IE 8 mandatorily, the page layout is even more confused.
In such cases all browsers will do a similar treatment, this page looks good in
IE is just a coincidence.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list