SitePoint Sponsor

User Tag List

Results 1 to 19 of 19
  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cuffley
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mike Foster's x Floater Bar

    I found Mike Foster's cross-browser site. Great stuff. I decided that the x Floater Bar example was what I needed to add a floating footer to my web site at www.phone-pages.org.uk/con/

    It works OK with IE, but although his example works OK on NN7.2, on my site it seems to return an incorrectly large xClientHeight, eg around 1822 instead of 846 on IE and 798 on Opera 7. If you click on the services button, the footer 'menu' goes flying off the screen at great speed. On this page I've added text at the bottom to record the xCleintHeight that is being calculated. Also on Opera 7, the footer is ok on initial setting but doesn't respond to window scroll and this does happen on Mike's example page too.

    I'm obviously doing something stupid, so all assistance welcome.

    Peter Walker

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Peter, glad you found some of my toys useful

    First, run that page thru a validator. Some of your <UL> html is invalid.

  3. #3
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cuffley
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK Mike, fixed all that. HTML and CSS pass for HTML4. NN7.2 still a problem.

    Thanks Peter

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, don't have time for much of a reply right now, will come back later.
    The problem may have to do with the fact that I'm simulating the scroll event in Moz.
    For now, the following might be a quick fix:

    Currently you have this at the end of the file:
    Code:
    </table></div>
    <hr width="500"><br>
    <div align="center" class="menu" id="menu1">Hollyer Associates Ltd &nbsp;&nbsp;24 Bacons Drive, Cuffley, Herts EN6 4DU&nbsp;&nbsp; Registered in England No. 5234058</div>
    Try the following change. It puts the menu in the main containing DIV.
    Code:
    </table>
    <div align="center" class="menu" id="menu1">Hollyer Associates Ltd &nbsp;&nbsp;24 Bacons Drive, Cuffley, Herts EN6 4DU&nbsp;&nbsp; Registered in England No. 5234058</div>
    </div>
    <hr width="500"><br>

  5. #5
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As an experiment, open the file 'x_event.js' and replace the functions xAddEventListener and xRemoveEventListener with the following:
    Code:
    function xAddEventListener(e,eventType,eventListener,useCapture) {
      if(!(e=xGetElementById(e))) return;
      eventType=eventType.toLowerCase();
      var eh='e.on'+eventType+'=eventListener';
      if(e.addEventListener) e.addEventListener(eventType,eventListener,useCapture);
      else if(e.attachEvent) e.attachEvent('on'+eventType,eventListener);
      else eval(eh);
    }
    function xRemoveEventListener(e,eventType,eventListener,useCapture) {
      if(!(e=xGetElementById(e))) return;
      eventType=eventType.toLowerCase();
      var eh='e.on'+eventType+'=null';
      if(e.removeEventListener) e.removeEventListener(eventType,eventListener,useCapture);
      else if(e.detachEvent) e.detachEvent('on'+eventType,eventListener);
      else eval(eh);
    }

  6. #6
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cuffley
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mike,

    Thanks. I made the changes to x_event.js. It changes the behaviour under NN7.2. It no longer keeps going down, but stops at the end of the text. But it doesn't therefore float to the bottom of the window as it does in IE. Opera still has frozen bar.

    Peter

  7. #7
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't have NN7, I have Mozilla. NN7 is just an older version of Mozilla.

    Does my demo work with NN7.2? It works for me in Mozilla, Opera, and IE.

  8. #8
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cuffley
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mike,

    Yes, NN7 does work with your demo! Which makes it difficult to see what's wrong. The Opera problem is there on your demo, though.

    I tried Mozilla Firefox 1.0 and it behaves like NN7.2

    Peter

  9. #9
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What Opera problem? What version of Opera do you have?

  10. #10
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cuffley
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mike, Sorry not to get back to you before, but this sitepoint system is inconsistent with telling me about replies to messages. Anyhow, I'm using Opera 7.0 build 2345.

  11. #11
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cuffley
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mike, I've now upgraded to laest version of Opera and all is well. So this just leaves curious difference with NN7, which works ok on your demo, but not on my page.

  12. #12
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Peter,

    I've been away also. I'll try to take a look later.

  13. #13
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this. Revert back to the original 'x_event.js' file, and use the following doctype:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    Or use the following doctype (you'll need to make a few changes to get it to validate).
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

  14. #14
    Degrading Gracefully PalmerB's Avatar
    Join Date
    Sep 2001
    Location
    Ohio - U.S.A. Outlook: Cautiously Optimistic
    Posts
    3,283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    That type of menu bugs the heck out of me. They use something similar at About.com that shows up when you scroll down the page. It's very distracting. No offense intended Mike

  15. #15
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cuffley
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mike,
    Great stuff - works a treat!

  16. #16
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No offense taken, PalmerB I appreciate hearing everyone's opinions.

    Thanks pjwalker, the real fix needs to be made to xClientHeight - I'm working on that, but for now, forcing standards mode will work.

  17. #17
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PalmerB, I'm curious to know your opinion of the 'floating toolbar' on some of the main pages of my site (link is in sig). I had hoped that it would be less distracting because of its small size. I would appreciate hearing your thoughts on it. TIA

  18. #18
    Degrading Gracefully PalmerB's Avatar
    Join Date
    Sep 2001
    Location
    Ohio - U.S.A. Outlook: Cautiously Optimistic
    Posts
    3,283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MikeFoster
    PalmerB, I'm curious to know your opinion of the 'floating toolbar' on some of the main pages of my site (link is in sig). I had hoped that it would be less distracting because of its small size. I would appreciate hearing your thoughts on it. TIA
    It is better but still draws my attention away from the center of the page as I scroll while I read. My peripheral vision forces me to jump to the right almost like the reaction you get when you flinch as you see something coming your way out of the corner of your eye.

    If it was not black that would be a good change. Maybe make it a darker shade of the background color it is currently on. That would still make it visible but not take my focus away from the content. Another change for the better (if possible) is a slower movement of the menu into place. Maybe if it gradually moved, it wouldn't snap my neck

  19. #19
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much Palmer, I'll keep those ideas in mind because I may make a few changes soon.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •