Cees wrote:
On Aug 8, 4:31 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
But in IE6 - i am at work now and can check with IE Developer.
Result of margin-top CSS calculations for TB_window are the same when
page is on top or at bottom so it is not so strange that thickbox
picture is placed in the same position. Values for my case :
margin : -273px auto auto -196px
pos: absolute
top: 50%
I noticed you use document.body.scrollTop for calculating the
position of the image - from the expression field construction i can
extract you are familiar with the IE6 bug refered to in this
document : http://javascript.about.com/library/bliebug.htm ?!?
I entered javascript:alert(document.compatMode); in my IE6 session at
it returns with CSS1Compat FYI.
Not true. What you're refering to is already handled in my expression:
TBWindowMargin = document.documentElement &&
document.documentElement.scrollTop || document.body.scrollTop
That is the same as:
TBWindowMargin = document.documentElement &&
document.documentElement.scrollTop ? document.documentElement.scrollTop
: document.body.scrollTop;
just shorter. So if there is a documentElement.scrollTop that one is
used, else body.scrollTop.
So far I didn't experience any problems with that expression with my
Thickbox Reloaded plugin, although here I'm setting the expression via
script and not via expression in the style sheet:
modal[0].style.setExpression('marginTop', '0 -
parseInt(this.offsetHeight / 2) + (document.documentElement &&
document.documentElement.scrollTop || document.body.scrollTop) + "px"');
You could try and modify the expression, I suspect the assignment
TBWindowMargin = ... not being applied:
* html #TB_window { /* ie6 hack */
position: absolute;
margin-top: expression(0 - parseInt(this.offsetHeight / 2) +
(document.documentElement && document.documentElement.scrollTop ||
document.body.scrollTop) + 'px');
}
--Klaus