designer wrote:
> I've taken your code and added a menu to the top of it, and it works
> after a fashion. It doesn't work in IE5.5 and I don't know what to do
> with it, esp as I don't fully understand what the IE expression is
> doing. 
> 
> http://www.treyarnon.fsworld.co.uk/kernow/propertydetails/200kmax.html


Odd, because I thought I checked it in IE5.5 before I sent that
message last week; but apparently not, since it appears that it
isn't recognizing the documentElement.

To make it work in IE5.5 and 6, change the expression to this:

top: expression((document.documentElement.scrollTop ?
document.documentElement.scrollTop : document.body.scrollTop) +
Math.random()*0);

IE6 in standards mode will use the documentElement, while 5.5
(as well as 6 in quirks mode) will use document.body.

[What the expression is doing, essentially, is substituting a
JavaScript calculation in place of a static value in the CSS.
It looks at the current value of the scrollTop attribute for
either the documentElement or the body, and uses that as the
top value for the absolutely positioned menu. As the page
scrolls, this value will change and thus the position of the
menu will change to match it. Due to a bug in how expressions
are handled, however, it does not update on the fly like it
should; somebody realized that by forcing it to calculate a
new random number every time the page is scrolled, they could
get it to update the value each time. Hence the Math.random
part.]


>  The 'house of the month' page just goes barmy at low res (640
> by 480) and indeed, on the other pages, the div with the tabular data
> sort of slips under the menu div!  I've overcome this by putting a
> 50px pad at the top of the data div, but I feel rather like I'm
> wandering about in the dark, not really in control, and certainly not
> yet producing anything worth having! 


Looks like the problem for most pages at 640x480 comes from the
menu contents wrapping, so the menu gets taller and starts
covering content. Since you're displaying the list items inline,
if you add:
#menu ul { white-space: nowrap; }
to menu.css, it should prevent that from happening. The menu
will scroll off the right side of the screen instead, but that's
pretty inevitable at such a tiny screen size.

The House of the Month page is a different matter however. The
flash objects on that page are completely obscuring your menu.
Flash will apparently be drawn on top of any HTML elements with
which it intersects on the screen, regardless of source order,
z-index or anything else. To address this, you can position the
flash so it won't intersect with the menu. Adding
        padding-top: 50px
to your  #layoutgrid td  rule will allow the menu to be seen
when the page loads, but then it will still get covered when
they scroll. Since this will apply to a (hopefully) very small
percentage of users, you might be able to live with it like
that. Alternatively, you could remove the fixed/absolute
positioning on that page only, so the menu will scroll up 
with the page.

Good luck,
Martin Lambert
[EMAIL PROTECTED]


******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to