Manuel Razzari wrote:
> The spec says "a length value is a <number> (with or without a
> decimal point)", and IE and FF behave as expected. Why is Opera doing
> this? Any workarounds?
> Not finding anything on google makes me feel maybe I'm missing
> something trivial...?
It is a genuine weak spot in Opera. Decimals are ignored/rounded down on
some properties/values, like width in percentages. Also some problems
with large em-values.
No real workarounds exists AFAIK - Opera will have to fix the browser.
Having written that: I almost always manage to work around the problem
with ignored decimals, and achieve cross-browser reliable results. I do
that by introducing small margins and/or paddings to "fill in" Opera's
missing decimals for width ...for all browsers.
I tend to add margins and/or paddings for fine-adjustments anyway, so it
actually took quite a while before I noticed Opera's weakness - maybe
because it is so predictable and results are always stable. I find
Firefox' over-precision and rounding towards zero to be more of a
problem, since that tends to result in "lost lines/pixels".
As mentioned in another thread: calculation-methods differ between
browsers. Some are less accurate, some are over-precise, some can be
over-run, and some are just buggy. Hopefully all browser-makers will
adjust and even out the methods they use, so the results - at least in
the normal range - becomes more reliable and predictable across
browser-land, but it may take quite some time before they get there.
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/