This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > December 2003 > Opera bug with calculating element width





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Opera bug with calculating element width
delerious@no.spam.com

2003-12-14, 11:12 am

These browser inconsistencies are starting to drive me crazy!

Here's an Opera 7.22 bug I just found:

When calculating an element's width using
document.defaultView.getComputedStyle(element,'').getPropertyValue('width'),
Opera includes the element's padding, which is wrong.

Mozilla does not include the padding.

kayodeok

2003-12-14, 11:12 am

delerious@no.spam.com wrote in
news:3fdc3c39.173888960@news.md.comcast.giganews.com:
quote:

> Here's an Opera 7.22 bug I just found:
>
> When calculating an element's width using
> document.defaultView.getComputedStyle(element,'').getPropertyValu
> e('width'), Opera includes the element's padding, which is
> wrong.



Upgrade to Opera 7.23 - though I am not sure whether or not you will
still encounter the bug; but there are security issues involved with
7.22 anyway:

http://www.secunia.com/advisories/10425/
http://www.secunia.com/advisories/10277/

In anycase, the above sounds like JavaScript and Opera was never
strong in that department.

--
Kayode Okeyode
http://www.kayodeok.co.uk/weblog/
http://www.kayodeok.btinternet.co.u...s/webdesign.htm
delerious@no.spam.com

2003-12-14, 11:12 am

On 14 Dec 2003 11:06:13 GMT, kayodeok <news4kayode@btopenworld.com> wrote:
quote:

>Upgrade to Opera 7.23 - though I am not sure whether or not you will
>still encounter the bug; but there are security issues involved with
>7.22 anyway:



Just upgraded. Opera 7.23 still suffers from the bug. :-(

Toby A Inkster

2003-12-14, 11:12 am

kayodeok wrote:
quote:

> Upgrade to Opera 7.23 - though I am not sure whether or not you will
> still encounter the bug; but there are security issues involved with
> 7.22 anyway



7.22 and 7.23 were pure security fixes, with no changes to the rendering
engine.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

Eric Bohlman

2003-12-14, 11:12 am

delerious@no.spam.com wrote in
news:3fdc3c39.173888960@news.md.comcast.giganews.com:
quote:

> These browser inconsistencies are starting to drive me crazy!
>
> Here's an Opera 7.22 bug I just found:
>
> When calculating an element's width using
> document.defaultView.getComputedStyle(element,'').getPropertyValue('wid
> th'), Opera includes the element's padding, which is wrong.
>
> Mozilla does not include the padding.



Are you sure Opera isn't running in quirks mode? document.compatMode will
tell you.
Martin Honnen

2003-12-15, 4:35 pm



Eric Bohlman wrote:
quote:

> delerious@no.spam.com wrote in
> news:3fdc3c39.173888960@news.md.comcast.giganews.com:
>
>
>
>
> Are you sure Opera isn't running in quirks mode? document.compatMode will
> tell you.



I have tested with 7.20, see
http://home.arcor.de/martin.honnen/...yleOfWidth.html
and I think delerious is right, it is a bug in Opera.
--

Martin Honnen
http://JavaScript.FAQTs.com/

delerious@no.spam.com

2003-12-15, 4:35 pm

On 14 Dec 2003 15:16:04 GMT, Eric Bohlman <ebohlman@earthlink.net> wrote:
quote:

>Are you sure Opera isn't running in quirks mode? document.compatMode will
>tell you.



My doctype is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews