SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict ruba's Avatar
    Join Date
    Apr 2005
    Location
    Amman -Jordan
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question view area in the top

    hi every body
    I have this code
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    
    <style>
    table{position:absolute; }
    </style>
    <script type="text/javascript">
    var i=0
    var c=0
    var intHide
    function show_hide_menu()
    {
    if (c==0)
    	{
    	document.getElementById("main_table").style.display="inline";
    	clearInterval(intHide)
    	intShow=setInterval("show()",10)
    	c=1
    	}
    else
    	{
    	clearInterval(intShow)
    	intHide=setInterval("hide()",10)
    	c=0
    	}
    }
    function show()
    {
    if (i>-60)
    	{
    	i=i-1
    	document.all("menu").style.bottom=i
    	}
    }
    function hide()
    {
    if (i<0)
    	{
    	i=i+1
    	document.all("menu").style.bottom=i
    	if ( i == -1 ){
    		document.getElementById("main_table").style.display="none";
    	}
    	}
    }
    </script>
    </head>
    <body onload="show_hide_menu()" bottommargin="0" leftmargin="0" rightmargin="0">
    
    <table class="topnav" width="90%" style="display:none;top:0;left:0" id="main_table">
    <tr>
    <td>
    <table border="1" width="60%"  id="menu" height="65" cellpadding="0" cellspacing="0" bgcolor="#F5F5F5">
    	<tr>
    		<td>
    		<p align="center">I LOve YOU
    		<a  onclick="javascript:show_hide_menu()" style="cursor:hand"><img border="0" src="X.JPG" width="16" height="13" ></a></td>
    	</tr>
    </table>
    
    </td>
    </tr>
    </table>
    
    <table cellpadding="1" cellspacing="0" border="0" ><tr><td>aaa
    <p >Click on the MENU to see the menu options.</p>
    </td>
    </tr>
    </table>
    
    </body>
    </html>
    I want to make the menu in the top of the page not on the page content, make the page content get down and when close it the page content back to the top , please I need your help

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ruba View Post
    hi every body
    I have this code
    [code]
    <style>
    table{position:absolute; }
    </style>
    Did you tried to add top, border-top and border-right below your position setting?

    I did like this on my menu:

    position:absolute;
    top: 0;
    background-color: lightyellow;
    width: 150px; /*Default width of hint.*/
    padding: 3px;
    border:1px solid black;
    font:normal 11px Verdana;
    line-height:18px;
    z-index:100;
    border-right: 3px solid black;
    border-bottom: 3px solid black;
    visibility: hidden;

  3. #3
    SitePoint Addict ruba's Avatar
    Join Date
    Apr 2005
    Location
    Amman -Jordan
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry but i don't understand you, I don't write the code, I make few modication on it..

    I have two tables . all table visibility is hidden , the page is empty

    I don't know what to do
    please tell me more

    Thanks

  4. #4
    SitePoint Addict ruba's Avatar
    Join Date
    Apr 2005
    Location
    Amman -Jordan
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi every body I write the code , If any one need it
    you can but advertise on it , it will appear once each houre
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
    <title>Untitled Document</title>
    <script>
    
    	function getexpirydateTopBanner( nodays){
    		var UTCstring;
    		Today = new Date();
    		nomilli=Date.parse(Today);
    		Today.setTime(nomilli+nodays*24*60*60*1000);
    		UTCstring = Today.toUTCString();
    		return UTCstring;
    	}//end function getexpirydata
    
    	function setcookieTopBanner(name,value,duration){
    		cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydateTopBanner(duration);
    		document.cookie=cookiestring;
    		if(!getcookieTopBanner(name)){
    			return false;
    		} else {
    			return true;
    		}
    	}//end set cookie
    
    	function getcookieTopBanner(cookiename) {
    		 var cookiestring=""+document.cookie;
    		 var index1=cookiestring.indexOf(cookiename);
    		 if (index1==-1 || cookiename=="") return ""; 
    			 var index2=cookiestring.indexOf(';',index1);
    		 if (index2==-1) index2=cookiestring.length; 
    			 return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
    	}//end get cookie
    	
    	var banneri=0
    	var bannerc=0
    	var intHide
    
    	function closebox() {
    		show_hide_menu();
    	}
    	function displayHeadBox() {
    		var topCookie = getcookieTopBanner('topBanner') 
    		if (!topCookie) { 
    			document.getElementById('topBox').style.display='inline';
    			document.getElementById('topBox').innerHTML='<div id="topM" style="overflow:hidden; width:100px; height:0px;border:thick solid;background:#fff;" >test banner<br><a onclick="closebox()" style="cursor:hand">close</a></div>';
    			show_hide_menu()		
     setcookieTopBanner('topBanner', 1, 1/24);
    } 
    	}
    	
    	function show_hide_menu() {
    		if (bannerc==0)	{
    			clearInterval(intHide)
    			intShow=setInterval("show()",10)
    			bannerc=1
    		} else {
    			clearInterval(intShow)
    			intHide=setInterval("hide()",10)
    			bannerc=0
    		}	
    	}
    
    	
    	function show() {
    		if (banneri<60) {
    			banneri=banneri+1
    			document.getElementById("topM").style.height=banneri
    		}
    	}
    
    	function hide() {
    		if (banneri != 0 ) {
    			banneri=banneri-1
    			document.getElementById("topM").style.height=banneri
    		} else {
    			document.getElementById('topBox').style.display='none'
    		}
    	}
    </script>
    </head>
    
    <body onLoad="displayHeadBox()" topmargin="0" rightmargin="0" leftmargin="0" >
    <div id="topBox" style="display:none"></div>
    smile
    
    
    </body>
    </html>
    Thanks every body


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
  •