Closed Bug 178119 Opened 23 years ago Closed 21 years ago

Width and height style not applied to positioned <span> element

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 34415

People

(Reporter: mozilla, Assigned: jst)

References

()

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 A friend of mine is using style attribute in img tags to position a crosshair image on a map image to show the location various pictures were taken. The only place it works correctly is with IE; Mozilla, even the latest 1.2b I just downloaded, simply doesn't display either the map or the crosshairs at all. Reproducible: Always Steps to Reproduce: 1. Go to the listed url 2. 3. Actual Results: The map/crossshairs were not displayed Expected Results: To the left of the pictures on the page, should be a small picture of a map of the island, with a red crosshair image overlaying it showing the location of the picture to the right.
Attached image Correct rendering by IE
<span style="position:relative;left:0px;top:0px;height:214px;width:187px"> Surely your friend means "<div>", not "<span>"? Seeing as "height" and "width" do not apply to spans by default (except in IE, which has a bug....). Or you could put the position:relative on the table cell itself... I suspect that this is triggering a bug in out positioning with respect to inlines code, but even if we were to fix that bug the page would not render like it does in IE...
Attached file Corrected Web page
This file works correctly in both MSIE and Mozilla (Well... almost. If you look closely you will find anther rendering bug with MSIE :p)
-> INVALID Per CSS standard specification, width and height do not apply to inline element (<span>) Reporter (Alan Batie), please file a bug report against this MSIE behavior in Microsoft's bug system (or alternatively, spam MSIE user support forums :p)
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Summary: img tags with style attributes are being ignored → Width and height style not applied to positioned <span> element
Sorry about that, and thanks!
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
*** This bug has been marked as a duplicate of 34415 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: