Closed
Bug 280815
Opened 20 years ago
Closed 19 years ago
absolute CSS position doesnt take image height into account
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: karnaugh, Assigned: bugzilla)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 If we have an IMG tag on a line <IMG etc../><BR/> and a SPAN after that, with an absolute CSS position style <SPAN style="position:absolute.." etc.>Foobar</span> The span is placed incorrectly with respect to the rest of the page. If the IMG line contains some kind of text, like a non blocking space before the line break, it is rendered perfectly. It seems to be restricted to cases where a <BR /> appears after the IMG tag with no text on the line. This might be poor HTML code, but the renderer should have super cow powers as IE seems to render this fine (of course it screws the rest of it up, but what do we expect) Reproducible: Always Steps to Reproduce: 1. Aquire cup of coffee 2. Write this into a file <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- .test { font-size: 12px; font-style: bold; font-weight: normal; position: absolute; text-align: right; right: 70px; } dt { background-color: #CCCCCC; } --> </style> </head> <body> <dl> <dt>FOO <SPAN class="test">BAR</SPAN></dt> <dd>foobar</dd> </dl> <br/><br/> <dl><dt>FOO <SPAN class="test">BAR</SPAN></dt> <dd><img src="http://www.karnaugh.za.net/data/teleport.png" alt="this is an image" /><br/></dd> </dl> <br/><br/> <dl><dt>FOO <SPAN class="test">BAR</SPAN></dt> <dd>foobar</dd> </dl> <br/><br/> </body> </html> 3. Insert a nonblocking space between the <IMG/> and <BR/> tags as so <img src="http://www.karnaugh.za.net/data/teleport.png" alt="this is an image" /> <br/> The page now renders as expected 4. Drink coffee and fix bug please. Actual Results: The SPAN is not moved down with the line breaks that do not contain text. Expected Results: It *should* move the span down with the line breaks, so that it is within the <DT>
Comment 1•20 years ago
|
||
this is possibly already fixed in the recent nightly trunk builds, from a quick glance at your bug description. You can check it out yourself to see if it the bug is still there in the latest builds. You can download a nightly trunk build here: http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/ I would recommend the zipped build to quickly test this issue.
Comment 2•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050831 Firefox/1.0+ ID:2005083106 WFM
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•