Closed Bug 376619 Opened 17 years ago Closed 17 years ago

Text does not respect actual image location when wrapping when style properties top and left are used to reposition the image.

Categories

(Core :: Layout: Floats, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jfenech, Unassigned)

Details

(Keywords: testcase)

Attachments

(3 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Text does not respect <div style="top:Ypx; left:Xpx;"> by wrapping around the actual location of the image. Instead, it wraps around the location where the image would have been inline.

Reproducible: Always

Steps to Reproduce:
See example html in Additional Information to reproduce the issue.
The image is placed correctly. However, the text is wrapped around the location where the image would have been had it not been moved.
Actual Results:  
The bug.

Expected Results:  
Text should have respected the image's actual location, rather than where it would have been if not placed in a slightly different location.

Example html (Replace TestImg.gif with a gif of your own choosing)

<html><head /><body>

<table align="center" border="1" cellpadding="0" cellspacing="0">

<tr>


<td>

<div style="position:relative; float:right; top:0px; left:100px; ">
<img src="TestImg.gif" width="323" height="240" alt="" /></div>

<div style="width:500px;">
PavingCo Asphalt & Paving Corp. produces asphalt materials for our own paving operation as well as, other 
contractors, state, county and city public works customers.  Producing the asphalt paving 
material enables us to better serve our customers with a quality controlled paving product.   
<br /><br />
We design and provide a variety of specific purpose mixes to our customers, SuperPave based paving mixes, 
high performance cold mixes, porous asphalt (drainable pavement), crushed recycled asphalt pavement (RAP), 
treated recycled asphalt pavement (TRAP), special recreational trail mixes to mixes, interstate mixes, just 
to name a few.
<br /><br />
Our production of asphalt paving materials is tested and monitored by our own Statesota Department of 
Transportation certified employees and laboratory equipped with the latest in asphalt testing 
technology.  All the materials used in the production of the HMA are sampled and tested in 
accordance with the Statesota Department of Transportation Specifications (SDOT).  During production 
and placement of the HMA, density samples are taken and tested in our laboratory to insure the 
quality of our product, according to our quality control program.  The sampling and testing is 
performed by SDOT certified lab technicians.  Many of the samples are taken to an independent 
laboratory to further verify our results.  During placement of the HMA, a density machine is used 
to monitor the compaction and to aid in achieving the desired density.

</div>
</td>


</tr>
</table>

</body></head>
Just a plain old gif made with photoshop
Version: unspecified → 2.0 Branch
Attached file Reporter's testcase
Attachment #260726 - Attachment is obsolete: true
Attachment #260727 - Attachment is obsolete: true
Attached file Testcase #2
IIRC, this has been resolved as INVALID in the past but I can't find the bug...
Component: General → Layout: Floats
Keywords: testcase
OS: Windows Server 2003 → All
Product: Firefox → Core
QA Contact: general → layout.floats
Hardware: PC → All
Version: 2.0 Branch → unspecified
I certainly couldn't find a bug for it.

Do you mean the behavior is invalid, or the bug report?
The bug report, since the layout was considered to be correct.
It doesn't look very correct to me.
Do you know of a workaround for this apparent flaw?
relative and absolute positioning are designed primarily for animation effects, and they intentionally don't change the layout of the stuff around the positioned element (relative positioning by acting as though it was still at its original position, absolute positioning by acting as though it were not there).  I recommend against using them in other cases, because of problems like this, which is exactly what the spec says should happen.

->invalid
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Attached file Workaround?
(In reply to comment #8)
Maybe something like this would work for you?
(In reply to comment #10)
> Created an attachment (id=260751) [details]
> Workaround?
> 
> (In reply to comment #8)
> Maybe something like this would work for you?
> 

That got me close, but it didn't quite work.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: