SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm hacking up Nav Bar II found at dynamicdrive.com

    I need to absolutely position it on the page, okay easy enough. But the problem is the netscape absolute position is about 6 pixels south of the IE absolute position. I need those 2 to be equal. There is a function built into the script to move the bar, but I need this movement based on whether they are using NS or IE. So I need it moved if the user is using NS and I need nothing to happen if they're not.

    Unfortunately I'm not a big javascript jockey so after trying for a bit I could use some help.

    Code:
    function init() {
    
      // Get width of window, need to account for scrollbar width in Netscape.
    
      fullWidth = getWindowWidth() 
        - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
    
      myNavBar1.resize(340);
      myNavBar1.create();
      myNavBar1.setzIndex(2);
      myNavBar1.moveTo(190, 160);	
      myNavBar1.moveBy(0, -6);
    }
    Now what I need is the display of that last line, mynavbar1.moveby(0, -6), dependent on what browser the user is using.

    Chris

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Change it to:

    Code:
    if (isMinNS4) {
      myNavBar1.moveBy(0, -6);}
    Wayne Luke
    ------------


  3. #3
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, but I already figured it out a different way.


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
  •