Closed Bug 250498 Opened 16 years ago Closed 15 years ago

CSS position:absolute; right:<length>; offsets incorrectly

Categories

(Core :: Layout: Positioned, defect)

PowerPC
macOS
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 201897

People

(Reporter: chris.behm, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040628 Firefox/0.9.1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040628 Firefox/0.9.1

Mozilla/Firefox appears to be offsetting objects which use the right:
positioning parameter based on the object's _left_ edge rather than it's right edge.

According to the W3: This [the 'right'] property specifies how far a box's right
content edge is offset to the left of the right edge of the box's containing block.

You can see the CSS file at http://cjbehm.dyndns.org/wingingit/custom.css

Reproducible: Always
Steps to Reproduce:
[0. Make sure JavaScript is on]
1. Load http://cjbehm.dyndns.org/
2. Hover mouse over the text "show weather"
3. Compare location of now-visible div containing weather.com data with the
results from Safari or Win/IE 5+
Actual Results:  
When loaded in Mozilla or Firefox, the div is made visible over the menu area,
which is incorrect.

Expected Results:  
The div in question (the weather.com data) should be offset from its right edge
by 14em, which would place it over the "main" area of the page.

I searched the bug database to find any references to similar bugs, but did not
find any. This leads me to believe that it may be the fact that the data is
being loaded from weather.com via JavaScript and the width of the container is
perhaps not known when mozilla does its layout.

However, Safari and even Win/IE5+ manage to get it right.
> 1. Load http://cjbehm.dyndns.org/

This just gives an error page (401 Forbidden).  Please point to a URL I can
actually look at that shows the issue.
(In reply to comment #1)
> > 1. Load http://cjbehm.dyndns.org/
> 
> This just gives an error page (401 Forbidden).  Please point to a URL I can
> actually look at that shows the issue.

Ah, my bad, server had some rules changed:

http://cjbehm.dyndns.org/wingingit/
Attached file Minimal testcase (obsolete) —
This is essentially bug 201897 (here we're preventing going left of the
container, but it's the same thing and the same wrong code).
Depends on: 201897
"Minimal testcase" appears to be a patch.  What is its status?
It's not a patch for this bug; I just attached the wrong file....  The testcase
was just needed to demonstrate that this is caused by bug 201897 anyway.
Attachment #153356 - Attachment is obsolete: true
confirming, since it was marked "depends on", not "duplicate".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Uri, please do not confirm layout bugs without a minimal testcase attached...
Attached file minimal testcase
Blue div should be 14em away from the right margin. Instead it is adjacent to
the right margin.
Seeing on Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5)
Gecko/20041008 Firefox/0.9.1+.
Keywords: testcase

*** This bug has been marked as a duplicate of 201897 ***
Status: NEW → RESOLVED
Closed: 15 years ago
No longer depends on: 201897
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.