Old 12-24-2004   #1 (permalink)
Registered User
 
Stiker's Avatar
 
Join Date: Apr 2004
Location: Kansas
Posts: 120

Send a message via AIM to Stiker
Drop Downs

Here are the problems.

1) Im new to the concept
2) The tutorial i am using uses divs, im doing a table based site
3) With the code i have used it displays my Menu items above my site. Id give you a visual but ill just explain in text.

[Drop down menu item]
[Top_bar spacer]
[Banner]
[Links were menu items should be coming out of]
[Rest of the site]

Here is the code. If someone can point out what i am doing wrong that would be great

Code:
<html>
<head>
<title>index</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<style type="text/css">

	   ul {
  	   	  padding: 0;
  		  margin: 0;
  		  list-style: none;
  		  }
	   li {
  	   	  float: left;
  		  position: relative;
  		  width: 10 em;
  		  }
	   li ul {
  	   	  	 display: none;
  			 position: absolute; 
 			 top: 1 em;
  			 left: 0;
  			 }
	   ul li a {
	   	  	   display: block;
			   text-decoration: none;
			   color: #777;
			   background: #fff;
			   padding: 5px;
			   border: 1px solid #ccc;
			   border-bottom: 0;
			   }
	   li > ul {
	   	  	   top: auto;
			   left: auto;
			   }
	   li:hover ul, li.over ul{ display: block; }

</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;
//--><!]]></script>



<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (index.psd) -->
<table id="content" width="801" height="1001" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="13">
			<img src="index/Top_bar.gif" width="800" height="19" alt=""></td>
		<td>
			<img src="index/spacer.gif" width="1" height="19" alt=""></td>
	</tr>
	<tr>
		<td colspan="13">
			<img src="index/Banner.gif" width="800" height="202" alt=""></td>
		<td>
			<img src="index/spacer.gif" width="1" height="202" alt=""></td>
	</tr>
	<tr>
	
		  <ul id="nav"> 
    	  	   <li>
			   	   <td colspan="2"><a href="http://www.ksu.edu/sigep/"><img src="index/Home.gif" width="122" height="24" alt="" border="0"></a></td>
			   </li> 
    		   <li>
			   	   <td colspan="2"><a href="http://www.ksu.edu/sigep/"><img src="index/Sigep.gif" width="116" height="24" alt="" border="0"></a></td> 
          	   		  <ul> 
          	   		  	   <li><a href="">Creed</a></li> 
        	   			   <li><a href="">Intramurals</a></li> 
        	   			   <li><a href="">Philanthropy</a></li> 
      	  			  </ul> 
    	  	   </li> 
    		   <li>
			   	   <td colspan="4"><a href="http://www.ksu.edu/sigep/"><img src="index/Recruitment.gif" width="112" height="24" alt="" border="0"></a></td> 
     		   		   <ul> 
        			   	   <li><a href="">Why Sigep?</a></li> 
       					   <li><a href="">Rush Events</a></li> 
        				   <li><a href="">Application</a></li> 
        				   <li><a href="">Contact Info.</a></li> 
      				  </ul> 
    		   </li>
    		   <li>
			   	   <td><a href="http://www.ksu.edu/sigep/"><img src="index/Roster.gif" width="115" height="24" alt="" border="0"></a></td> 
      		   		  <ul> 
       				  	  <li><a href="">Executives</a></li> 
        				  <li><a href="">Member List</a></li> 
      			      </ul> 
    		   </li> 
			   <li>
			   	   <td><a href="http://www.ksu.edu/sigep/"><img src="index/Balanced_Man.gif" width="112" height="24" alt="" border="0"></a></td>
      		   		  <ul> 
       				  	  <li><a href="">BMP</a></li> 
        				  <li><a href="">BM Scholarship</a></li> 
      			      </ul> 
    		   </li> 
			   <li>
			   	  <td colspan="2"><a href="http://www.ksu.edu/sigep/"><img src="index/History.gif" width="113" height="24" alt="" border="0"></a></td> 
      		   		  <ul> 
       				  	  <li><a href="">Kansas Beta</a></li> 
        				  <li><a href="">National</a></li> 
      			      </ul> 
    		   </li> 
			   <li>
			   	   <td><a href="http://www.ksu.edu/sigep/"><img src="index/Links.gif" width="110" height="24" alt="" border="0"></a></td> 
      		   		  <ul> 
       				  	  <li><a href="">Alumni</a></li> 
        				  <li><a href="">Sigep.org</a></li> 
      			      </ul> 
    		   </li>
  		  </ul>
		  <td>
			<img src="index/spacer.gif" width="1" height="24" alt=""></td>
		
	</tr>
	<tr>
		<td colspan="13">
			<img src="index/index_10.gif" width="800" height="18" alt=""></td>
		<td>
			<img src="index/spacer.gif" width="1" height="18" alt=""></td>
	</tr>

</table>
</body>
</html>
I summed it up there at the end with the end tags but the site is much larger. The rest of the code does mean anything to this post so i did not include it. I get the idea of how it works how then did the mouse over stuff etc. But once again i understnad how it works but am unable to get it to do it.
__________________
I can read it,
and understand it,
but when i try it everything goes wrong.
Reading master, Coding failure
Stiker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-24-2004   #2 (permalink)
Lazy Biorust Inhabitant
 
Trigona's Avatar
 
Join Date: Aug 2004
Location: Sweden, Uddevalla
Posts: 123

I'm not good at html, and I can't see what you are trying to accomplish (needs spelling correction). But I can''t see any code for the drop down menu item. Neither can I see any scipting in the link code.
But this may be very wrong, so don't be hard on me.
__________________
Trigona is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-24-2004   #3 (permalink)
Registered User
 
Stiker's Avatar
 
Join Date: Apr 2004
Location: Kansas
Posts: 120

Send a message via AIM to Stiker
Not going to be hard on ya

Yeah with this is takes away all the jscript. What i am trying to accomplish is using a list format. The lists will be hiden within the link button. By using CSS it enables you to do just that. And to fix the IE bug we change it around a little at the end when using jscript with mouse overs and such. But from the tut my code is correct however they were using divs and i think that is the main reason my code is messed.
__________________
I can read it,
and understand it,
but when i try it everything goes wrong.
Reading master, Coding failure

Last edited by Stiker; 12-24-2004 at 11:38 PM. Reason: spelling
Stiker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-25-2004   #4 (permalink)
Registered User
 
Stiker's Avatar
 
Join Date: Apr 2004
Location: Kansas
Posts: 120

Send a message via AIM to Stiker
just wow

Long week i figured it out....dont know what i was thinking. please forgive my incopetence (sp?) hahahaha im just laughing really hard at myself..
__________________
I can read it,
and understand it,
but when i try it everything goes wrong.
Reading master, Coding failure
Stiker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-25-2004   #5 (permalink)
Moderator
 
ConceptualMind's Avatar
 
Join Date: Oct 2003
Location: BioRUST Design Community
Posts: 2,652

So what was the mistake?
__________________
ConceptualMind
ConceptualMind is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-25-2004   #6 (permalink)
Registered User
 
Stiker's Avatar
 
Join Date: Apr 2004
Location: Kansas
Posts: 120

Send a message via AIM to Stiker
I was putting the list outside the table for one. and two when using this format you can not branch the list out in to individual lists in different sections of the table it has to be one list. ill post the code when i have finished tweaking it. Pain in the neck though.
__________________
I can read it,
and understand it,
but when i try it everything goes wrong.
Reading master, Coding failure
Stiker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-25-2004   #7 (permalink)
Moderator
 
ConceptualMind's Avatar
 
Join Date: Oct 2003
Location: BioRUST Design Community
Posts: 2,652

Well I'm glad you figured it out.
__________________
ConceptualMind
ConceptualMind is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-27-2004   #8 (permalink)
Registered User
 
Stiker's Avatar
 
Join Date: Apr 2004
Location: Kansas
Posts: 120

Send a message via AIM to Stiker
here is the code:

Here is the code for CSS dropdowns in tables! Yeah what a pain!

Code:
<html>
<head>
<title>index2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;
//--><!]]></script>
<style type="text/css">
<!--
	   ul {
	   	  list-style: none;
		  padding: 0;
		  margin: 0;
	
		  }
	ul li a {
		display: block;
		 text-decoration: none;
		color: #777;
		background: #CCCEEA;
		padding: 0px;
				  
		}


 	 a {
	     font-weight: bold;
	     color: #000;
		   }

         a {
	 text-decoration: none;
	}

         li li a {
	  display: block;
	font-weight: normal;
	color: #000;
	 padding: .25em 0px;
	 border: 1px solid #000;
	border-bottom: 0;
	}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
 * html ul li a { height: 1%; }
/* End */


        li {
	 float: left;
	 position: relative;
	width: 105px;
	 font-family: Verdana, Arial, Helvetica, sans-serif;
	 font-size: 11px;
	 text-align: center;
	 cursor: default;
	background-color: white;
	}

        li ul {
	display: none;
	 position: absolute;
	 top: 100%;
	left: 0;
	 font-weight: normal;
	 background: #000;
	padding: 0em 0px 0em 0px;
	border-bottom: 2px solid #000
	}

        li>ul {
	 top: auto;
	 left: auto;
	}

        li li {
              display: block;
              float: none;
              background-color: #000;
              border: 0 #000;
	 }

        li:hover ul, li.over ul {display: block;}
</style>
<body dontsteal="YES" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table id="Table_01" width="801" height="1000" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="7" width="800" alt="">
		<ul id="nav"> 
    	  	   <li style="width: 122">
			   	   <a href="http://www.ksu.edu/sigep/"><img src="index/Home.gif" width="122" height="24" alt="" border="0"></a>
			   </li> 
    		   <li style="width: 116">
			   	   <a href="http://www.ksu.edu/creed/"><img src="index/Sigep.gif" width="116" height="24" alt="" border="0"></a> 
          	   		  <ul> 
          	   		  	   <li><a href="">Creed</a></li> 
        	   			   <li><a href="">Intramurals</a></li> 
        	   			   <li><a href="">Philanthropy</a></li> 
      	  			  </ul> 
    	  	   </li> 
    		   <li style="width: 112">
			   	  <a href="http://www.ksu.edu/rush/"><img src="index/Recruitment.gif" width="112" height="24" alt="" border="0"></a> 
     		   		   <ul> 
        			   	   <li><a href="">Why Sigep?</a></li> 
       			                   <li><a href="">Rush Events</a></li> 
        				   <li><a href="">Application</a></li> 
        				   <li><a href="">Contact Info.</a></li> 
      				  </ul> 
    		   </li>
    		   <li style="width: 115">
			   	   <a href="http://www.ksu.edu/roster/"><img src="index/Roster.gif" width="115" height="24" alt="" border="0"></a> 
      		   		  <ul> 
       				  <li><a href="">Executives</a></li> 
        				  <li><a href="">Member List</a></li> 
      			      </ul> 
    		   </li> 
	                   <li style="width: 112">
			   	   <a href="http://www.ksu.edu/bm/"><img src="index/Balanced_Man.gif" width="112" height="24" alt="" border="0"></a>
      		   		  <ul> 
       				  <li><a href="">BMP</a></li> 
        				  <li><a href="">BM Scholarship</a></li> 
      			      </ul> 
    		   </li> 
		   <li style="width: 113">
			   	 <a href="http://www.ksu.edu/history/"><img src="index/History.gif" width="113" height="24" alt="" border="0"></a> 
      		   		  <ul> 
       				  <li><a href="">Kansas Beta</a></li> 
        				  <li><a href="">National</a></li> 
      			      </ul> 
    		   </li> 
		   <li style="width: 110">
			   	   <a href="http://www.ksu.edu/links/"><img src="index/Links.gif" width="110" height="24" alt="" border="0"></a> 
      		   		  <ul> 
       				  <li><a href="">Alumni</a></li> 
        				  <li><a href="">Sigep.org</a></li> 
      			      </ul> 
    		   </li>
  		  </ul>
		</td>
		<td>
</tr>
</table>
</body>
</html>
I left out a couple images and stuff just so the section that actually has the dropdown in it is seen. If anyone would like to use this and needs some explanation on what does what and how i got this pain in the next to work post here and ill send you the code minus my images and such with a detailed explanation on what does what in the CSS etc. Trial and Error is a pain in the butt, but someone has to do it
__________________
I can read it,
and understand it,
but when i try it everything goes wrong.
Reading master, Coding failure
Stiker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-27-2004   #9 (permalink)
Lazy Biorust Inhabitant
 
Trigona's Avatar
 
Join Date: Aug 2004
Location: Sweden, Uddevalla
Posts: 123

neat! like dhtml menus but w/o dhtml....
__________________
Trigona is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-12-2005   #10 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
why dont u get PS do this,man?^^
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 10:23 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT