I use a fairly simple bit of html/css/javascript for toolip/popup boxes on my site www.canadianhottie.ca but they do not work in firefox. I would like to fix this, they work in IE6 and 7.
Here is a test page, where I have just the code for the tooltip
http://www.canadianhottie.ca/test.html
Here are the 3 parts
html
javascriptHTML Code:<a href="" target="_blank" onMouseOut="Hide(Popup1)" onMouseOver="Show(Popup1)" onMouseMove="Show(Popup1)"><img src="" border="0" /></a> <div id="Popup1" class="transparent">tooltip content</div>
CSSCode:<script language="JavaScript" type="text/javascript"> <!-- /* this function shows the pop-up when user moves the mouse over the link */ function Show(Popup) { /* get the mouse left position */ x = event.clientX + document.body.scrollLeft; /* get the mouse top position */ y = event.clientY + document.body.scrollTop; /* display the pop-up */ Popup.style.display="block"; /* set the pop-up's left */ Popup.style.left = x; /* set the pop-up's top */ Popup.style.top = y; } /* this function hides the pop-up when user moves the mouse out of the link */ function Hide(Popup) { /* hide the pop-up */ Popup.style.display="none"; } //--> </script>
how can I get this too work in firefox? why doens't it work?Code:<style> .transparent { background-color: #E9E9E9; border: 1px solid black; display:none; width:150px; position:absolute; color:#333333; } </style>
thanks in advance for any help.





Bookmarks