FancyPrairie
Programmer
I created a simple html page with a text box and an unordered list. I want the top of the unordered list to be located at the same y coordinate as the top of the text box. However, if part of the unordered list falls below the window, I want the bottom of the unordered list to line up with the top of the text box. Consequently, I add textbox.offsetTop + unorderedlist.offsetHeight and check to see if the result is greater than screen.availHeight. Although the calculation indicates that the result is < screen.availHeight, when displayed, part of the unordered list falls below the page. In my case screen.availHeight = 860. However, if I expand a button, for example, so that it is the same length as the page, it gives a height of 710.
I'm running this on IE8. One other note. The display property of the unorderedlist is set to "none". As a result, I don't get any x/y values. But when I set the display to "", then I have x/y values. So, I set display to "block" prior to my calc. Then I set it to "none" after my calc. Regardless, availHeight equals 860 prior to and after setting the "display" property.
I don't get it. Is there a bug in IE8 that would cause this ptoblem? Or, am I doing something stupid? Or does someone have a solion?
I'm running this on IE8. One other note. The display property of the unorderedlist is set to "none". As a result, I don't get any x/y values. But when I set the display to "", then I have x/y values. So, I set display to "block" prior to my calc. Then I set it to "none" after my calc. Regardless, availHeight equals 860 prior to and after setting the "display" property.
I don't get it. Is there a bug in IE8 that would cause this ptoblem? Or, am I doing something stupid? Or does someone have a solion?