SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Problem with a movable navigation menu -- overlapping

    At my Get the Look site I use javascript to make the menu follow the user down the page (check out one of the longer pages to make it work).

    When the browser window gets set to certain sizes, the menu overlaps the footer:



    Does anyone know of a way that I could make it stop before it overlaps? To see the problem, try making your browser wide and short, then scroll to the bottom.

    Here's some of the more important code:

    Javascript:
    Code:
    <!-- Begin
    function setVariables() {
    if (navigator.appName == "Netscape") {
    v=".top=";
    dS="document.";
    sD="";
    y="window.pageYOffset";
    }
    else {
    v=".pixelTop=";
    dS="";
    sD=".style";
    y="document.body.scrollTop";
       }
    }
    function checkLocation() {
    object="object1";
    yy=eval(y);
    eval(dS+object+sD+v+yy);
    setTimeout("checkLocation()",10);
    }
    //  End -->
    The DIV that surrounds the navigation:
    Code:
    <div id="object1" style="position:relative; visibility:visible; left:0px; top:0px; z-index:2">
    NAV TABLE INSIDE HERE
    </div>
    Thanks! I appreciate any help!
    Last edited by Adam P.; Aug 31, 2002 at 12:07.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I haven't looked at your source code real closely, but I think you will need to location the bottom of the page, and use some arithmetic to prevent your moving nav menu from moving below that bottom coordinate.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why dont you try use it relative to the bottom of the screen?
    or better, fixed from a certain height using percentages.
    then again, i dont know what im talking about
    InQuE


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
  •