OPERA GENERAL 15 OPERA S CALCULATION OF CSS RIGHT OFF BY 16PX
From: Arve Bersvendsen (arve+200305@no-spam)
Subject: Opera's calculation of CSS "right:" off by ~16px
Date: 9 Jul 2003 13:02:22 GMT


Look at <URL:http://www.virtuelvis.com/gallery/browserbugs/opera720/lr-bug.html>
The demo uses the CSS rule right:0px on three div's - one with position:fixed, one with position:absolute, and one with display:table;position:fixed;
The tree divs all have the rules left:0; right:0; set, yet none of them are the same width - the right edge of the absolutely positioned div is off by ~16px, and the display:table'd div is off by one or two pixels.
If I set margin and padding for <body> to 0, the value for "right:"
seems to act as anticipated.
This behavior differs from Mozilla, but I'm actually unsure whether Opera or Mozilla is violating the spec. Nontheless, I have reported this in the BTS; 120155.
-- Arve | http://www.bersvendsen.com/ | http://www.virtuelvis.com/

Lyd i nettbasert reklame? Nei takk!
http://www.bersvendsen.com/stillhet/


From: Toman (toman@no-spam)
Subject: Re: Opera's calculation of CSS "right:" off by ~16px
Date: Wed, 09 Jul 2003 16:13:49 +0200

On 9 Jul 2003 13:02:22 GMT, Arve Bersvendsen <arve+200305@no-spam> wrote:

> Look at > <URL:http://www.virtuelvis.com/gallery/browserbugs/opera720/lr-bug.html>
>
> The demo uses the CSS rule right:0px on three div's - one with > position:fixed, one with position:absolute, and one with > display:table;position:fixed;
>
> The tree divs all have the rules left:0; right:0; set, yet none of > them are the same width - the right edge of the absolutely positioned > div is off by ~16px, and the display:table'd div is off by one or > two pixels.
>
> If I set margin and padding for <body> to 0, the value for "right:"
> seems to act as anticipated.

Opera's default padding on body is 8px.
Meaning only fixed should be all viewport wide, while absolute (which is relative to the containing block, body in this case) should actually be centered (0 8px), not '0 16px 0 0' like it is now.
If I replace border with outline, both fixed div's are equal width.

> This behavior differs from Mozilla, but I'm actually unsure whether > Opera or Mozilla is violating the spec. Nontheless, I have reported this > in the BTS; 120155.

Mozilla violates the absolute rule or it doesn't have a default padding/margin, but Opera still has a bug. Seems like correct left and width are Opera's 'heroes' :)

-- Toman (win98,PII300,256MB)