Depending on the mode of IE8 I'm in (quark or standard), I get different values for height and width. I
I have tried standard javascript and jquery, but these two return different results.
In quirks
$ ('body'). Width = $ 1239 ('body'). Height = 184 document body.clientWidth = 1231 document body.clientHeight = 176 in standards
$ ('body'). Width = $ 1260 ('Body'). Height = 182 document.body.clientWidth = 1254 document.body.clientHeight = 176 How to obtain an irreversible value from IE8 mode.
Perhaps this issue is due to being included in scrollbar width and height, Whether they exist or not, I do not have IE (on the Mac), so can not be verified.
However, I can tell you that I have no such problem to work according to my project. We use the following code in it:
// Make the size of the overlay body var $ body = $ (this.ie6? Document.body: document); // crash6 ('# lightbox-overlay') by using the document in ie6. CSS ({width: $ body.width ()), height: $ body.height ()}) causes; // ... get some code ... // window dimension var $ window = $ (window); Var wWidth = $ window.width (); Var wHeight = $ window.height (); And the overlay displays correctly, I would rely on the results of the jQuery width and height compared to the original results, because jQuery naturally has any type of look with the browser Keep in mind.
It is important to note that the above lightbox script for $ (document) more $ (document.body) for any reason - I can not remember sorry: hey - so maybe it also solves the problem?
Comments
Post a Comment