Results 1 to 4 of 4

Thread: Static Menu

  1. #1
    Join Date
    Feb 2005
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Static Menu

    I have 2 pages that I am trying to make two elements stationary. I have googled it but could not find the answer. I think you can use javascript to do this because there is a script in your database that enables you to do this. These two elements are divs and I am not sure if you use CSS (like when putting a background stationary) or javascript. Well here are my two pages and I would like to menus to be stationary so that when you scroll they do not move. Thank you.

    http://home.comcast.net/~allbonz89/sc/winner.htm
    http://home.comcast.net/~allbonz89/sc/old.htm

    And the page that you have the static menu is
    http://www.dynamicdrive.com/dynamici...taticmenu3.htm
    If that helps any.

    Thank you again,
    Tony

  2. #2
    Join Date
    Feb 2005
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Also can I do this without taking away the divs because I have a third page that now has this problem except it is with the background... the page name is

    http://home.comcast.net/~allbonz89/sc/player.htm

  3. #3
    Join Date
    Feb 2005
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I found a solution for old.htm and player.htm but the script that I used below for these two pages did not work for winner.htm. This is because I used percentages to define the position of the div. Also for the div on that page I define its position from right and top instead of the usual left and right.

    Code:
    <html>
    <head>
    <title>Floating Div (Bottom Left)</title>
    </head>
    <body bgcolor="#000000">
    <!-- ********************************************************* -->
         * You may use this code for free on any web page provided that 
         * these comment lines and the following credit remain in the code.
         * BottomLeft Floating Div from http://www.javascript-fx.com
         ********************************************************  -->
    <div id="divStayBottomLeft" style="position:absolute">
    <img src="javascriptfx.gif"/>
    </div>
    <script type="text/javascript">
    function JSFX_FloatBottomLeft()
    {
    	var startX = 10, startY = 50;
    	var ns = (navigator.appName.indexOf("Netscape") != -1);
    	var d = document;
    	function ml(id)
    	{
    		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
    		if(d.layers)el.style=el;
    		el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
    		el.x = startX; 
    		el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
    		el.y -= startY;
    		return el;
    	}
    	window.stayBottomLeft=function()
    	{
    		var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
    		fblObj.y += (pY - startY - fblObj.y)/8;
    		fblObj.sP(fblObj.x, fblObj.y);
    		setTimeout("stayBottomLeft()", 40);
    	}
    	fblObj = ml("divStayBottomLeft");
    	stayBottomLeft();
    }
    JSFX_FloatBottomLeft();
    </script>
    <!-- ********************************************************* -->
    
    <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    
    <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    
    <!-- ********************************************************* -->
    </body>
    </html>
    Last edited by TheBigT; 06-25-2005 at 12:04 AM.

  4. #4
    Join Date
    Feb 2005
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Everything is fixed... thanks to anyone who tried to help.
    Last edited by TheBigT; 06-25-2005 at 01:58 AM.

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
  •