Previous Message
Next Message

Decimal units in Opera

Sent by Bruno Fassino on 9 September 2006 08:08


Manuel Razzari wrote:

> Why does Opera (from 5 to 9) is rounding down my decimal units ? If I
> say 99.9%, for Opera it's exactly equal to 99%.
>
> For example, the following HTML:
>
> <div id="div1" style="width: 99%;">width: 99%</div>
> <div id="div2" style="width: 99.9%;">width: 99.9%</div>
> <div id="div3" style="width: 100%;">width: 100%</div>
>
> In IE and Firefox, #div2 is almost as wide as #div3.
> In Opera, #div2 is exactly as wide as #div1.
....
>
> Not finding anything on google makes me feel maybe I'm missing
> something trivial...?

Don't think you are missing anything! All browsers have sort of "computation
errors."
In part they are caused by unavoidable roundings/approximations (they may
show up even where not expected, due to internal representations of lengths,
different measurement units, ...)
In part they are caused by a "too small" number of bits allocated to
represent some quantities. Opera seems to have problems of this type. IOW it
seems that Opera deliberately choose to perform some computations with fewer
digits, causing bigger errors.

I have several test cases showing these problems in Opera [1], [2]. I don't
think they have a solution (except for working around to find a condition
where the errors are not visible or not detrimental to the design.)


[1] http://brunildo.org/test/emarg.pl
[2] http://brunildo.org/test/percmarg2.pl

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: