Jump to content

Have a challenge


tridean
 Share

Recommended Posts

Hello Java experts,I'm having trouble getting a drop down menu to do what I want. I used one of w3's example and manipulated it to do exactly what I want it to do in the w3 experiment window. But when I enter it into my system it doesn't work. My website is www.wildfigurines.com and the code is below.I am trying to put the drop down menu in the left side navigation but when I enter it in I get the link Animals link twice & the drop down menu doesn't work and all the links have gone bald. It's almost as if the code from the dropdown menu is overriding all the text but that still doesn't explain why the drop down menu won't drop down. Anyone know what I'm doing wrong? To view this code you'll just have to surround it with <html></html>

<style>body{font-family:Times New Roman;}table{font-size:80%;}a{color:#435611;text-decoration:none;font:bold}a:hover{color:#435611}td.menu{background:#fdf5ac}table.menu{font-size:100%;position:absolute;visibility:hidden;}</style><script type="text/javascript">function showmenu(elmnt){document.getElementById(elmnt).style.visibility="visible"}function hidemenu(elmnt){document.getElementById(elmnt).style.visibility="hidden"}</script><body><table width="80"> <tr bgcolor="#fdf5ac" border="0">  <td onmouseover="showmenu('animals')" onmouseout="hidemenu('animals')">   <a href="http://www.wildfigurines.com/Animal_Figurines.html">Animals</a><br />   <table class="menu" id="animals" width="80"><tr><td class="menu"><a href="http://www.wildfigurines.com/Animal_Figurines/Cows1.html">Cows</a></td></tr>   <tr><td class="menu"><a href="http://www.wildfigurines.com/Elephant_Figurines.html">Elephants</a></td></tr><tr><td class="menu"><a href="http://www.wildfigurines.com/Animal_Figurines/Goats1.html">Goats</a></td></tr>   <tr><td class="menu"><a href="http://www.wildfigurines.com/Giraffe_Figurines.html">Giraffes</a></td></tr>   <tr><td class="menu"><a href="http://www.wildfigurines.com/Lion_Figurines.html">Lions</a></td></tr><tr><td class="menu"><a href="http://www.wildfigurines.com/Animal_Figurines/Llamas1.html">Llamas</a></td></tr>   <tr><td class="menu"><a href="http://www.wildfigurines.com/Moose_Figurines.html">Moose</a></td></tr>   <tr><td class="menu"><a href="http://www.wildfigurines.com/Pig_Figurines.html">Pigs</a></td></tr><tr><td class="menu"><a href="http://www.wildfigurines.com/Animal_Figurines/Rabbits1.html">Rabbits</a></td></tr><tr><td class="menu"><a href="http://www.wildfigurines.com/Animal_Figurines/Sheep1.html">Sheep</a></td></tr><tr><td class="menu"><a href="http://www.wildfigurines.com/Tiger_Figurines.html">Tigers</a></td></tr><tr><td class="menu"><a href="http://www.wildfigurines.com/Wolf_Figurines.html">Wolves</a></td></tr><tr><td class="menu"><a href=""></a></td></tr><tr><td class="menu"><a href=""></a></td></tr><tr><td class="menu"><a href=""></a></td></tr>   </table>  </td>   </tr></table></body>

Link to comment
Share on other sites

I don't see anything that would make it act up."Bald" links...in your style you took off the decoration is that what you meant to do?Did something a little different with the style, you can use ".menu td"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>  <title></title><style>body{font-family:Times New Roman;}table{font-size:80%;}a{color:#435611;text-decoration:none;font:bold}a:hover{color:#435611}table.menu{font-size:100%;position:absolute;visibility:hidden;}.menu td{background:#fdf5ac}</style><script type="text/javascript">function showmenu(elmnt){document.getElementById(elmnt).style.visibility="visible"}function hidemenu(elmnt){document.getElementById(elmnt).style.visibility="hidden"}</script><body><table width="80"><tr bgcolor="#fdf5ac" border="0"> <td onmouseover="showmenu('animals')" onmouseout="hidemenu('animals')">  <a href="http://www.wildfigurines.com/Animal_Figurines.html">Animals</a><br />  <table class="menu" id="animals" width="80"><tr><td><a href="http://www.wildfigurines.com/Animal_Figurines/Cows1.html">Cows</a></td></tr>  <tr><td><a href="http://www.wildfigurines.com/Elephant_Figurines.html">Elephants</a></td></tr><tr><td><a href="http://www.wildfigurines.com/Animal_Figurines/Goats1.html">Goats</a></td></tr>  <tr><td><a href="http://www.wildfigurines.com/Giraffe_Figurines.html">Giraffes</a></td></tr>  <tr><td><a href="http://www.wildfigurines.com/Lion_Figurines.html">Lions</a></td></tr><tr><td><a href="http://www.wildfigurines.com/Animal_Figurines/Llamas1.html">Llamas</a></td></tr>  <tr><td><a href="http://www.wildfigurines.com/Moose_Figurines.html">Moose</a></td></tr>  <tr><td><a href="http://www.wildfigurines.com/Pig_Figurines.html">Pigs</a></td></tr><tr><td><a href="http://www.wildfigurines.com/Animal_Figurines/Rabbits1.html">Rabbits</a></td></tr><tr><td><a href="http://www.wildfigurines.com/Animal_Figurines/Sheep1.html">Sheep</a></td></tr><tr><td><a href="http://www.wildfigurines.com/Tiger_Figurines.html">Tigers</a></td></tr><tr><td><a href="http://www.wildfigurines.com/Wolf_Figurines.html">Wolves</a></td></tr><tr><td><a href=""></a></td></tr><tr><td><a href=""></a></td></tr><tr><td><a href=""></a></td></tr>  </table> </td> </tr></table>test text</body></html>

Here's a pretty cool tool that will take the uglies out of your table format..http://www.fixingyourwebsite.com/drhtml.htmlThanks,

Link to comment
Share on other sites

Hi, I actually fixed it but I now have a new prob - I posted this in other forum but thought it might get a response here.Hello,I was wondering if someone could help me. If you go to this page 'My Webpage' and hover your mouse over 'Animals' on the side navigation you will see a menu pop up. The problem is that people who don't have a scrollng mouse will struggle to use the menu. Can anyone show me how to get the menu to scroll down further just be the action of someone's mouse moving towards the bottom of the menu.CheersDean

Link to comment
Share on other sites

well i used google and found this code

<script language="JavaScript1.2">/*Top-Down scrolling window Script-© Dynamic Drive (www.dynamicdrive.com)For full source code, installation instructions,100's more free DHTML scripts, and Terms OfUse, visit dynamicdrive.com*///change 1 to another integer to alter the scroll speed. Greater is fastervar speed=1var currentpos=0,alt=1,curpos1=0,curpos2=-1var intervalvar scrollit=truefunction initialize(){startit()}function scrollwindow(){if (scrollit) {if (document.all)temp=document.body.scrollTopelsetemp=window.pageYOffsetif (alt==0)alt=1elsealt=0if (alt==0)curpos1=tempelsecurpos2=tempif (curpos1!=curpos2){if (document.all)currentpos=document.body.scrollTop+speedelsecurrentpos=window.pageYOffset+speedwindow.scroll(0,currentpos)}else{currentpos=0window.scroll(0,currentpos)}}}function startit(){setInterval("scrollwindow()",10)}window.onload=initialize</script></head><body onmouseover="scrollit=false" onmouseout="scrollit=true">

I dont know if it will work however with your need's

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...