Re: Calendar Positioning in IE
2004/10/11 23:50
Viewed 57820 times
Replies: 1/1
by rhys

hmmm... i did a bit more checking and it appears that the strangeness i was seeing was to do with <br /> tags in IE, but only when combined with some dodgy css.. more details when i work it out, but for now please don't worry about getting a solution.

Thanks,
Rhys

Re[2]: Calendar Positioning in IE
2004/10/12 17:19
Viewed 55412 times
Replies: 0/0
by rhys

right, as it turns out, IE doesn't calculate offsets correctly if the container box is positioned using relative and the element having the offset determined isn't also positioned using relative (or absolute.. it breaks in a different way with absolute). What happens is that IE returns the offset relative to the body, but still returns the container box as the offsetParent... confused? you will be.

What i did was update the getAbsolutePos() method to take this into account and stop recursing when it hits an element in a relatively positioned box and no (static/fixed) positioning itself.

The other broken bit is this: IE will append the body offset to the last absolute positioned element with a relatively positioned box between it and the body.. not that IE will give you the body offset mind :( i can't think of a way to fix this and for now, will just make sure that none of my body elements have and margins/padding... gah!

last
Google