I added drop downs on one of my site, but im having a problem with something. This has never happened to me before. Everytime i change the last line the drop down stops working. This works: ar anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name! anylinkmenu1.items=[ ["Shared & Reseller", "http://www.tmzhosting.com/shared.php"], ["Proxy Hosting", "http://www.tmzhosting.com/proxy.php"], ["Virtual Private Servers", "http://www.tmzhosting.com/vps.php"], ["Dedicated Servers", "http://www.tmzhosting.com/dedicated.php"], ["JavaScript Special", "http://www.javascriptkit.com/jsref/"] //no comma following last entry! ] Code (markup): Now if i change just 1 LETTER on the last line were it says "JavaScript Special" it will stop working. Any idea why? - Prilep
Try doing this: ar anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name! anylinkmenu1.items=[ ["Shared & Reseller", "http://www.tmzhosting.com/shared.php"], ["Proxy Hosting", "http://www.tmzhosting.com/proxy.php"], ["Virtual Private Servers", "http://www.tmzhosting.com/vps.php"], ["Dedicated Servers", "http://www.tmzhosting.com/dedicated.php"], ["JavaScript Special Edit", "http://www.javascriptkit.com/jsref/"], ["", ""] ] Code (markup):
Thanks that works great, even tho it adds like one more blank option at the bottom. Now another problem i want the visited links to be this color: 0000ef Here is the CSS file, i looked for visited link, but could not find it anywhere: .selectedanchor{ /*CSS class that gets added to the currently selected anchor link (assuming it's a text link)*/ background: yellow; } /* ######### Default class for drop down menus ######### */ .anylinkmenu{ position: absolute; left: 0; top: 0; visibility: hidden; border: 1px solid black; border-bottom-width: 0; font: normal 12px Verdana; line-height: 18px; z-index: 100; /* zIndex should be greater than that of shadow's below */ background: lightyellow; width: 200px; /* default width for menu */ } .anylinkmenu ul{ margin: 0; padding: 0; list-style-type: none; } .anylinkmenu ul li a{ width: 100%; display: block; text-indent: 3px; border-bottom: 1px solid black; padding: 2px 0; text-decoration: none; font-weight: bold; text-indent: 5px; } .anylinkmenu a:hover{ /*hover background color*/ background: black; color: white; } /* ######### Alternate multi-column class for drop down menus ######### */ .anylinkmenucols{ position: absolute; width: 350px; left: 0; top: 0; visibility: hidden; border: 1px solid black; padding: 10px; font: normal 12px Verdana; z-index: 100; /*zIndex should be greater than that of shadow's below*/ background: #E9E9E9; } .anylinkmenucols li{ padding-bottom: 3px; } .anylinkmenucols .column{ float: left; padding: 3px 8px; margin-right: 5px; background: #E0E0E0; } .anylinkmenucols .column ul{ margin: 0; padding: 0; list-style-type: none; } /* ######### class for shadow DIV ######### */ .anylinkshadow{ /*CSS for shadow. Keep this as is */ position: absolute; left: 0; top: 0; z-index: 99; /*zIndex for shadow*/ background: black; visibility: hidden; } Code (markup): Thanks for all the help! Rep added. - Prilep