By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,492 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,492 IT Pros & Developers. It's quick & easy.

Opera bug with calculating element width

P: n/a
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.

Jul 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
de*******@no.spam.com wrote in
news:3f****************@news.md.comcast.giganews.c om:
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.uk.../webdesign.htm
Jul 20 '05 #2

P: n/a
On 14 Dec 2003 11:06:13 GMT, kayodeok <ne*********@btopenworld.com> wrote:
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. :-(

Jul 20 '05 #3

P: n/a
kayodeok wrote:
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

Jul 20 '05 #4

P: n/a
de*******@no.spam.com wrote in
news:3f****************@news.md.comcast.giganews.c om:
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.
Jul 20 '05 #5

P: n/a


Eric Bohlman wrote:
de*******@no.spam.com wrote in
news:3f****************@news.md.comcast.giganews.c om:

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.


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

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

Jul 20 '05 #6

P: n/a
On 14 Dec 2003 15:16:04 GMT, Eric Bohlman <eb******@earthlink.net> wrote:
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">

Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.