Hi I have a table with a div in it the table has 2 columns and both are 50% In most browsers I can use offsetWidth to get the width of the article. But in Safari the width is less or more than what it should be. Any help would be greatly appriciated. Regards Richard
A:
offsetWidth
is not a standardized value across browsers. It may or may not include the scroll-bar width. You may get more consistent figures from clientWidth
which tends to exclude margins, borders and scrollbars.
Isaac Lubow
2010-09-13 16:20:57
According to this http://www.quirksmode.org/dom/w3c_cssom.html it seems not to be the issue.
pepkin88
2010-09-13 16:27:57
A:
Maybe the value of offsetWidth is gathered in different time that in other browsers. Try calling it in onload or ondomready event.
pepkin88
2010-09-13 16:34:36
A:
Just set the width and height - safari's bug -just accept it.
Richard Housham
2010-09-17 10:21:00